Class ApiKeyAuthenticator
java.lang.Object
com.logicaldoc.core.security.authentication.AbstractAuthenticator
com.logicaldoc.core.security.authentication.DefaultAuthenticator
com.logicaldoc.core.security.authentication.ApiKeyAuthenticator
- All Implemented Interfaces:
Authenticator
This authenticator uses the API Key
- Since:
- 8.9.4
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
-
Method Summary
Modifier 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 apikey, Client client) Authenticates the user using the given credentials, if successful, the corresponding user is returned.void
setApiKeyDAO
(ApiKeyDAO apiKeyDAO) Methods inherited from class com.logicaldoc.core.security.authentication.DefaultAuthenticator
pickUser, setUserDAO, validateUser
Methods inherited from class com.logicaldoc.core.security.authentication.AbstractAuthenticator
authenticate, canAuthenticateUser, isEnabled
-
Constructor Details
-
ApiKeyAuthenticator
public ApiKeyAuthenticator()
-
-
Method Details
-
setApiKeyDAO
-
authenticate
Description copied from interface:Authenticator
Authenticates the user using the given credentials, if successful, the corresponding user is returned.- Specified by:
authenticate
in interfaceAuthenticator
- Overrides:
authenticate
in classDefaultAuthenticator
- Parameters:
username
- the usernamepassword
- the password- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
AuthenticationException
-
authenticate
public User authenticate(String username, String password, String apikey, Client client) throws AuthenticationException Description copied from interface:Authenticator
Authenticates the user using the given credentials, if successful, the corresponding user is returned.- Specified by:
authenticate
in interfaceAuthenticator
- Overrides:
authenticate
in classDefaultAuthenticator
- Parameters:
username
- the usernamepassword
- the passwordapikey
- Optional third authentication parameterclient
- Client informations- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
AuthenticationException
-