Module org.elasticsearch.security
Class PluggableApiKeyAuthenticator
java.lang.Object
org.elasticsearch.xpack.security.authc.PluggableApiKeyAuthenticator
- All Implemented Interfaces:
Authenticator
An adapter for
CustomApiKeyAuthenticator that implements the Authenticator interface, so the custom API key authenticator
can be plugged into the authenticator chain. Module dependencies prevent us from introducing a direct extension point for
an Authenticator.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.security.authc.Authenticator
Authenticator.Context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(Authenticator.Context context, ActionListener<AuthenticationResult<Authentication>> listener) Attempt to authenticate current request encapsulated by theAuthenticator.Contextobject.extractCredentials(Authenticator.Context context) Attempt to Extract anAuthenticationTokenfrom the givenAuthenticator.Context.name()A descriptive name of the authenticator.
-
Constructor Details
-
PluggableApiKeyAuthenticator
-
-
Method Details
-
name
Description copied from interface:AuthenticatorA descriptive name of the authenticator.- Specified by:
namein interfaceAuthenticator
-
extractCredentials
Description copied from interface:AuthenticatorAttempt to Extract anAuthenticationTokenfrom the givenAuthenticator.Context.- Specified by:
extractCredentialsin interfaceAuthenticator- Parameters:
context- The context object encapsulating current request and other information relevant for authentication.- Returns:
- An
AuthenticationTokenif one can be extracted or null if this Authenticator cannot extract one.
-
authenticate
public void authenticate(Authenticator.Context context, ActionListener<AuthenticationResult<Authentication>> listener) Description copied from interface:AuthenticatorAttempt to authenticate current request encapsulated by theAuthenticator.Contextobject.- Specified by:
authenticatein interfaceAuthenticator- Parameters:
context- The context object encapsulating current request and other information relevant for authentication.listener- The listener accepts aAuthenticationResultobject indicating the outcome of authentication.
-