Module org.elasticsearch.xcore
Interface CustomTokenAuthenticator
- All Superinterfaces:
CustomAuthenticator
Represents a custom authenticator that supports access token authentication method.
-
Method Summary
Modifier and TypeMethodDescriptiondefault AuthenticationTokenextractGrantAccessToken(Grant grant) Called to extractAuthenticationTokenfor theGrant.ACCESS_TOKEN_GRANT_TYPE.Methods inherited from interface org.elasticsearch.xpack.core.security.authc.CustomAuthenticator
authenticate, extractToken, supports
-
Method Details
-
extractGrantAccessToken
Called to extractAuthenticationTokenfor theGrant.ACCESS_TOKEN_GRANT_TYPE.This method is called to extract an access token during:
- User profile activation - the extracted token is used to authenticate the user before creating a user profile
- Grant API key - the extracted token is used to authenticate the user on whose behalf the API key is being created
The extracted token is then used to call the
CustomAuthenticator.authenticate(AuthenticationToken, ActionListener)method.To opt-out, implementors should return
nullif using token for grant endpoints is not supported.- Parameters:
grant- grant that holds end-user credentials- Returns:
- an authentication token if grant holds credentials that are supported by this authenticator
-