Class UserCanLoginVerifier
- java.lang.Object
-
- org.silverpeas.core.security.authentication.verifier.UserCanLoginVerifier
-
public class UserCanLoginVerifier extends Object
Class that provides tools to verify if the user can login in relation to its account state. User: Yohann Chastagnier Date: 02/02/13
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_INCORRECT_LOGIN_PWD
static String
ERROR_INCORRECT_LOGIN_PWD_DOMAIN
static String
ERROR_USER_ACCOUNT_BLOCKED
static String
ERROR_USER_ACCOUNT_DEACTIVATED
protected static SettingBundle
otherSettings
protected static SettingBundle
settings
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserCanLoginVerifier(UserDetail user)
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getErrorDestination()
Gets the error destination.protected static String
getString(String key, String language, String... params)
UserDetail
getUser()
Gets the user.protected static UserDetail
getUserById(String userId)
Gets a user from its identifier.void
setUser(UserDetail user)
Sets the user.void
verify()
Verify if the user can login.
-
-
-
Field Detail
-
ERROR_INCORRECT_LOGIN_PWD
public static final String ERROR_INCORRECT_LOGIN_PWD
- See Also:
- Constant Field Values
-
ERROR_INCORRECT_LOGIN_PWD_DOMAIN
public static final String ERROR_INCORRECT_LOGIN_PWD_DOMAIN
- See Also:
- Constant Field Values
-
ERROR_USER_ACCOUNT_BLOCKED
public static final String ERROR_USER_ACCOUNT_BLOCKED
- See Also:
- Constant Field Values
-
ERROR_USER_ACCOUNT_DEACTIVATED
public static final String ERROR_USER_ACCOUNT_DEACTIVATED
- See Also:
- Constant Field Values
-
settings
protected static final SettingBundle settings
-
otherSettings
protected static final SettingBundle otherSettings
-
-
Constructor Detail
-
UserCanLoginVerifier
protected UserCanLoginVerifier(UserDetail user)
Default constructor.- Parameters:
user
-
-
-
Method Detail
-
getErrorDestination
public String getErrorDestination()
Gets the error destination.- Returns:
-
verify
public void verify() throws AuthenticationException
Verify if the user can login.- Throws:
AuthenticationException
-
setUser
public void setUser(UserDetail user)
Sets the user.- Parameters:
user
- the user to set
-
getUser
public UserDetail getUser()
Gets the user.- Returns:
- the user
-
getUserById
protected static UserDetail getUserById(String userId)
Gets a user from its identifier.- Parameters:
userId
- the unique identifier of the user- Returns:
- the user
-
-