Class DefaultAuthenticator
- java.lang.Object
-
- com.logicaldoc.core.security.authentication.AbstractAuthenticator
-
- com.logicaldoc.core.security.authentication.DefaultAuthenticator
-
- All Implemented Interfaces:
Authenticator
public class DefaultAuthenticator extends AbstractAuthenticator
This is the basic authentication mechanism, that searches for the user in the LogicalDOC database.- Since:
- 4.5
- Author:
- Sebastian Wenzky
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
authenticate(String username, String password)
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.User
pickUser(String username)
This method does not authenticate the user but just retrieves his detailsvoid
setUserDAO(UserDAO userDAO)
void
validateUser(User user)
Perform some security validations on the user but does not check the password.-
Methods inherited from class com.logicaldoc.core.security.authentication.AbstractAuthenticator
authenticate, canAuthenticateUser, isEnabled
-
-
-
-
Method Detail
-
setUserDAO
public void setUserDAO(UserDAO userDAO)
-
authenticate
public User authenticate(String username, String password) throws AuthenticationException
Description copied from interface:Authenticator
Authenticates the user using the given credentials, if successful, the corresponding user is returned.- 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 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
- Overrides:
authenticate
in classAbstractAuthenticator
- Parameters:
username
- the usernamepassword
- the passwordkey
- Optional third authentication parameterclient
- Client informations- Returns:
- The user, or null if the authentication was unsuccessful
- Throws:
AuthenticationException
-
pickUser
public User pickUser(String username)
Description copied from interface:Authenticator
This 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
-
validateUser
public void validateUser(User user) throws AuthenticationException
Perform some security validations on the user but does not check the password.- Parameters:
user
- The user to validate- Throws:
AuthenticationException
- I something did not pass
-
-