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 connect in relation to its account state.- Author:
- Yohann Chastagnier Date: 02/02/13
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.silverpeas.kernel.bundle.SettingBundle
otherSettings
protected static org.silverpeas.kernel.bundle.SettingBundle
settings
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserCanLoginVerifier(User 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)
User
getUser()
Gets the user.protected static UserDetail
getUserById(String userId)
Gets a user from its identifier.void
setUser(User user)
Sets the user.void
verify()
Verify if the user can log in.
-
-
-
Constructor Detail
-
UserCanLoginVerifier
protected UserCanLoginVerifier(User user)
Default constructor.- Parameters:
user
- the user behind a connexion attempt.
-
-
Method Detail
-
getErrorDestination
public String getErrorDestination()
Gets the error destination.- Returns:
- the relative path of the error web page.
-
verify
public void verify() throws AuthenticationException
Verify if the user can log in.- Throws:
AuthenticationException
-
setUser
public void setUser(User user)
Sets the user.- Parameters:
user
- the user to set
-
getUser
public User 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
-
-