Interface CDORestAuthenticator
- All Known Implementing Classes:
ServletPrincipalAuthenticator, StaticBearerTokenAuthenticator
public interface CDORestAuthenticator
Authenticates one REST request and maps its trusted credentials to an opaque CDO user ID.
Implementations receive transport-neutral request metadata, including copied HTTP headers and an optional principal
supplied by a trusted transport. They must support concurrent calls, authenticate every request independently, and
return a non-empty user ID without changing its spelling or case. Invalid or missing credentials should result in a
CDORestAuthenticationException. Repository authorization remains the responsibility of the repository's
configured permission manager.
Authenticator instances are owned by repository exposures. A lifecycle-aware implementation is activated and deactivated with its exposure. Authentication results and credentials are never placed in the managed container.
- Author:
- Eike Stepper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringManaged-container product group used to create authenticator instances from repository-exposure configuration. -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(CDORestRequest request, IRepository repository) Authenticates one request for the addressed repository.default StringReturns an optional HTTP authentication challenge for missing or invalid credentials.Returns an optional OpenAPI Security Scheme object for this authenticator.default StringReturns an optional stable name for an OpenAPI security scheme supplied by this authenticator.
-
Field Details
-
PRODUCT_GROUP
Managed-container product group used to create authenticator instances from repository-exposure configuration.- See Also:
-
-
Method Details
-
authenticate
Authenticates one request for the addressed repository.- 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
- Throws:
CDORestAuthenticationException- if the request is missing valid credentials
-
getChallenge
Returns an optional HTTP authentication challenge for missing or invalid credentials.- Returns:
- a value suitable for
WWW-Authenticate, ornullwhen no challenge applies
-
getOpenAPISecuritySchemeName
Returns an optional stable name for an OpenAPI security scheme supplied by this authenticator.- Returns:
- the scheme name, or
nullwhen this mechanism has no static OpenAPI representation
-
getOpenAPISecurityScheme
Returns an optional OpenAPI Security Scheme object for this authenticator. The returned map must contain only public scheme metadata and must never contain credentials or secret configuration.- Returns:
- an OpenAPI Security Scheme object, or
nullwhen this mechanism has no static representation
-