Interface SyncAuthenticationBackend

    • Method Detail

      • authenticate

        User authenticate​(AuthCredentials credentials)
                   throws org.elasticsearch.ElasticsearchSecurityException
        Validate credentials and return an authenticated user (or throw an ElasticsearchSecurityException)

        Results of this method are normally cached so that we not need to query the backend for every authentication attempt.

        Parameters:
        The - credentials to be validated, never null
        Returns:
        the authenticated User, never null
        Throws:
        org.elasticsearch.ElasticsearchSecurityException - in case an authentication failure (when credentials are incorrect, the user does not exist or the backend is not reachable)
      • authenticate

        default void authenticate​(AuthCredentials credentials,
                                  Consumer<User> onSuccess,
                                  Consumer<Exception> onFailure)
        Validate credentials and return an authenticated user (or throw an ElasticsearchSecurityException)

        Results of this method are normally cached so that we not need to query the backend for every authentication attempt.

        Specified by:
        authenticate in interface AuthenticationBackend
        Parameters:
        The - credentials to be validated, never null
        Throws:
        org.elasticsearch.ElasticsearchSecurityException - in case an authentication failure (when credentials are incorrect, the user does not exist or the backend is not reachable)