Interface CustomTokenAuthenticator

All Superinterfaces:
CustomAuthenticator

public interface CustomTokenAuthenticator extends CustomAuthenticator
Represents a custom authenticator that supports access token authentication method.
  • Method Details

    • extractGrantAccessToken

      @Nullable default AuthenticationToken extractGrantAccessToken(Grant grant)
      Called to extract AuthenticationToken for the Grant.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 null if 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