Class AbstractAuthenticator
java.lang.Object
com.logicaldoc.core.security.authentication.AbstractAuthenticator
- All Implemented Interfaces:
- Authenticator
- Direct Known Subclasses:
- AuthenticationChain,- DefaultAuthenticator
A place to put common methods of the authenticators
- Since:
- 8.2.2
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionauthenticate(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 username) Checks if this authenticator can authenticate a userbooleanA provider can be in a disabled stateMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.logicaldoc.core.security.authentication.Authenticatorauthenticate, pickUser
- 
Constructor Details- 
AbstractAuthenticatorpublic AbstractAuthenticator()
 
- 
- 
Method Details- 
isEnabledpublic boolean isEnabled()Description copied from interface:AuthenticatorA provider can be in a disabled state- Specified by:
- isEnabledin interface- Authenticator
- Returns:
- if this authenticator is enabled
 
- 
canAuthenticateUserDescription copied from interface:AuthenticatorChecks if this authenticator can authenticate a user- Specified by:
- canAuthenticateUserin interface- Authenticator
- Parameters:
- username- the username to authenticate
- Returns:
- true only if this authenticator can authenticate the giver username
 
- 
authenticatepublic User authenticate(String username, String password, String key) throws AuthenticationException Description copied from interface:AuthenticatorAuthenticates the user using the given credentials, if successful, the corresponding user is returned.- Specified by:
- authenticatein interface- Authenticator
- Parameters:
- username- the username
- password- the password
- key- Optional third authentication parameter
- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
- AuthenticationException
 
- 
authenticatepublic User authenticate(String username, String password, String key, Client client) throws AuthenticationException Description copied from interface:AuthenticatorAuthenticates the user using the given credentials, if successful, the corresponding user is returned.- Specified by:
- authenticatein interface- Authenticator
- 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
 
 
-