Interface Authenticator
- All Superinterfaces:
Plugin
An
Authenticator's job is to authenticate an inbound request by resolving the provided
AuthenticationRequest to an instance of Authentication, which includes an
authenticated Actor within.
In the case that Authentication cannot be resolved, for example because the request is
missing the required authentication information, an AuthenticationException may be
thrown.
-
Method Summary
Modifier and TypeMethodDescriptionauthenticate(AuthenticationRequest authenticationRequest) Authenticates an inbound request given an instance of theAuthenticationRequest.voidinit(Map<String, Object> authenticatorConfig, AuthenticatorContext context) Initialize the Authenticator.
-
Method Details
-
init
Initialize the Authenticator. Invoked once at boot time.- Parameters:
authenticatorConfig- config provided to the authenticator derived from the Metadata Service YAML config. This config comes from the "plugins[].params.configs" configuration.context- nullable configuration objects that are potentially required by an Authenticator instance.
-
authenticate
@Nullable Authentication authenticate(@Nonnull AuthenticationRequest authenticationRequest) throws AuthenticationException Authenticates an inbound request given an instance of theAuthenticationRequest.- Parameters:
authenticationRequest- authentication requestAuthenticationRequestthat need to be authenticated If the request is authenticated successfully, an instance ofAuthenticationis returned. If the request cannot be authenticated, returns "null" or throws anAuthenticationException.- Throws:
AuthenticationException
-