Interface SyncAuthenticationBackend
-
- All Superinterfaces:
AuthenticationBackend
- All Known Subinterfaces:
AuthenticationBackend
- All Known Implementing Classes:
InternalAuthenticationBackend,NoOpAuthenticationBackend
public interface SyncAuthenticationBackend extends AuthenticationBackend
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.floragunn.searchguard.auth.api.AuthenticationBackend
AuthenticationBackend.UserCachingPolicy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Userauthenticate(AuthCredentials credentials)Validate credentials and return an authenticated user (or throw an ElasticsearchSecurityException)default voidauthenticate(AuthCredentials credentials, Consumer<User> onSuccess, Consumer<Exception> onFailure)Validate credentials and return an authenticated user (or throw an ElasticsearchSecurityException)-
Methods inherited from interface com.floragunn.searchguard.auth.api.AuthenticationBackend
exists, getType, userCachingPolicy
-
-
-
-
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:
authenticatein interfaceAuthenticationBackend- 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)
-
-