Class ServletPrincipalAuthenticator
java.lang.Object
org.eclipse.emf.cdo.server.spi.rest.ServletPrincipalAuthenticator
- All Implemented Interfaces:
CDORestAuthenticator
Maps a principal supplied by a trusted HTTP transport to its CDO user ID.
The default mapping is the exact value returned by Principal.getName(). The authenticator does not inspect
request headers and has no dependency on a Servlet API; a Servlet adapter may supply the standard authenticated
principal through CDORestRequest.getPrincipal().
- Author:
- Eike Stepper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAnnotation-factory type used for principal authentication configuration.Fields inherited from interface CDORestAuthenticator
PRODUCT_GROUP -
Constructor Summary
ConstructorsConstructorDescriptionCreates the transport-neutral principal authenticator. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(CDORestRequest request, IRepository repository) Authenticates one request for the addressed repository.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CDORestAuthenticator
getChallenge, getOpenAPISecurityScheme, getOpenAPISecuritySchemeName
-
Field Details
-
FACTORY_TYPE
Annotation-factory type used for principal authentication configuration.- See Also:
-
-
Constructor Details
-
ServletPrincipalAuthenticator
public ServletPrincipalAuthenticator()Creates the transport-neutral principal authenticator.
-
-
Method Details
-
authenticate
Description copied from interface:CDORestAuthenticatorAuthenticates one request for the addressed repository.- Specified by:
authenticatein interfaceCDORestAuthenticator- Parameters:
request- the transport-neutral request, including headers and any trusted transport principalrepository- the repository selected by the request route- Returns:
- the opaque CDO user ID associated with the authenticated caller
-