Class AuthenticationChain
java.lang.Object
com.logicaldoc.core.security.authentication.AbstractAuthenticator
com.logicaldoc.core.security.authentication.AuthenticationChain
- All Implemented Interfaces:
- Authenticator
This authentication component implements a chain of possible authentication
 sources that will be invoked sequentially.
- Since:
- 4.5
- Author:
- Sebastian Wenzky
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal Userauthenticate(String username, String password) Authenticates the user using the given credentials, if successful, the corresponding user is returned.final Userauthenticate(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 uservoidinit()Populate the authenticators chain using the extension point Authentication declared in the core plug-in.booleanA provider can be in a disabled stateThis method does not authenticate the user but just retrieves his detailsMethods inherited from class com.logicaldoc.core.security.authentication.AbstractAuthenticatorauthenticate
- 
Constructor Details- 
AuthenticationChainpublic AuthenticationChain()
 
- 
- 
Method Details- 
authenticateDescription copied from interface:AuthenticatorAuthenticates 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
 
- 
authenticatepublic final 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
- Overrides:
- authenticatein class- AbstractAuthenticator
- 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
 
- 
pickUserDescription copied from interface:AuthenticatorThis 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
 
- 
canAuthenticateUserDescription copied from interface:AuthenticatorChecks if this authenticator can authenticate a user- Specified by:
- canAuthenticateUserin interface- Authenticator
- Overrides:
- canAuthenticateUserin class- AbstractAuthenticator
- Parameters:
- user- the username to authenticate
- Returns:
- true only if this authenticator can authenticate the giver username
 
- 
initpublic void init()Populate the authenticators chain using the extension point Authentication declared in the core plug-in.
- 
isEnabledpublic boolean isEnabled()Description copied from interface:AuthenticatorA provider can be in a disabled state- Specified by:
- isEnabledin interface- Authenticator
- Overrides:
- isEnabledin class- AbstractAuthenticator
- Returns:
- if this authenticator is enabled
 
 
-