Interface Authenticator
- All Known Implementing Classes:
- AbstractAuthenticator,- ApiKeyAuthenticator,- AuthenticationChain,- DefaultAuthenticator
public interface Authenticator
Implementations of this interface must provide authentication of a user
 against a defined source.
- Since:
- 4.5
- Author:
- Sebastian Wenzky
- 
Method SummaryModifier and TypeMethodDescriptionauthenticate(String username, String password) Authenticates the user using the given credentials, if successful, the corresponding user is returned.authenticate(String username, String password, String key) Authenticates the user using the given credentials, if successful, the corresponding user is returned.authenticate(String username, String password, String key, Client client) Authenticates the user using the given credentials, if successful, the corresponding user is returned.booleancanAuthenticateUser(String user) Checks if this authenticator can authenticate a userbooleanA provider can be in a disabled stateThis method does not authenticate the user but just retrieves his details
- 
Method Details- 
authenticateAuthenticates the user using the given credentials, if successful, the corresponding user is returned.- Parameters:
- username- the username
- password- the password
- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
- AuthenticationException
 
- 
authenticateAuthenticates the user using the given credentials, if successful, the corresponding user is returned.- Parameters:
- username- the username
- password- the password
- key- Optional third authentication parameter
- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
- AuthenticationException
 
- 
authenticateUser authenticate(String username, String password, String key, Client client) throws AuthenticationException Authenticates the user using the given credentials, if successful, the corresponding user is returned.- Parameters:
- username- the username
- password- the password
- key- Optional third authentication parameter
- client- Client informations
- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
- AuthenticationException
 
- 
canAuthenticateUserChecks if this authenticator can authenticate a user- Parameters:
- user- the username to authenticate
- Returns:
- true only if this authenticator can authenticate the giver username
 
- 
isEnabledboolean isEnabled()A provider can be in a disabled state- Returns:
- if this authenticator is enabled
 
- 
pickUserThis method does not authenticate the user but just retrieves his details- Parameters:
- username- username of the user to find
- Returns:
- object representation of the user
- Throws:
- PersistenceException- Error in data layer
 
 
-