Class AbstractAuthenticator
- java.lang.Object
-
- com.logicaldoc.core.security.authentication.AbstractAuthenticator
-
- All Implemented Interfaces:
Authenticator
- Direct Known Subclasses:
AuthenticationChain
,DefaultAuthenticator
public abstract class AbstractAuthenticator extends Object implements Authenticator
A place to put common methods of the authenticators- Since:
- 8.2.2
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description AbstractAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
authenticate(String username, String password, String key)
Authenticates the user using the given credentials, if successful, the corresponding user is returned.User
authenticate(String username, String password, String key, Client client)
Authenticates the user using the given credentials, if successful, the corresponding user is returned.boolean
canAuthenticateUser(String username)
boolean
isEnabled()
A provider can be in a disabled state-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.logicaldoc.core.security.authentication.Authenticator
authenticate
-
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
Description copied from interface:Authenticator
A provider can be in a disabled state- Specified by:
isEnabled
in interfaceAuthenticator
- Returns:
- if this authenticator is enabled
-
canAuthenticateUser
public boolean canAuthenticateUser(String username)
- Specified by:
canAuthenticateUser
in interfaceAuthenticator
-
authenticate
public User authenticate(String username, String password, String key) 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
- Parameters:
username
- the usernamepassword
- the passwordkey
- Optional third authentication parameter- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
AuthenticationException
-
authenticate
public User authenticate(String username, String password, String key, 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
- Parameters:
username
- the usernamepassword
- the passwordkey
- Optional third authentication parameterclient
- Client informations- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
AuthenticationException
-
-