Interface SyncAuthorizationBackend

    • Method Detail

      • fillRoles

        void fillRoles​(User user,
                       AuthCredentials credentials)
                throws org.elasticsearch.ElasticsearchSecurityException
        Populate a User with backend roles. This method will not be called for cached users.

        Add them by calling either user.addRole() or user.addRoles()

        Parameters:
        user - The authenticated user to populate with backend roles, never null
        credentials - Credentials to authenticate to the authorization backend, maybe null. This parameter is for future usage, currently always empty credentials are passed!
        Throws:
        org.elasticsearch.ElasticsearchSecurityException - in case when the authorization backend cannot be reached or the credentials are insufficient to authenticate to the authorization backend.
      • retrieveRoles

        default void retrieveRoles​(User user,
                                   AuthCredentials credentials,
                                   Consumer<Collection<String>> onSuccess,
                                   Consumer<Exception> onFailure)
        Description copied from interface: AuthorizationBackend
        Populate a User with backend roles. This method will not be called for cached users.

        Add them by calling either user.addRole() or user.addRoles()

        Specified by:
        retrieveRoles in interface AuthorizationBackend
        Parameters:
        user - The authenticated user to populate with backend roles, never null
        credentials - Credentials to authenticate to the authorization backend, maybe null. This parameter is for future usage, currently always empty credentials are passed!