Class UserCanTryAgainToLoginVerifier
- java.lang.Object
-
- org.silverpeas.core.security.authentication.verifier.UserCanTryAgainToLoginVerifier
-
public class UserCanTryAgainToLoginVerifier extends Object
Class that provides tools to verify if the user can try to login one more time after a login error. User: Yohann Chastagnier Date: 05/02/13
-
-
Field Summary
Fields Modifier and Type Field Description protected static SettingBundle
otherSettings
protected static SettingBundle
settings
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UserCanTryAgainToLoginVerifier
clearCache()
Clearing the cache associated to the user.UserCanTryAgainToLoginVerifier
clearSession(javax.servlet.http.HttpServletRequest request)
Clearing the HTTP session.protected static UserCanTryAgainToLoginVerifier
get(UserDetail user)
Gets user connection attempt handling.String
getErrorDestination()
Gets the error destination.String
getMessage()
Gets (warning) message the message according to connection attempts.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.boolean
isActivated()
Indicates if the verifier is activated.String
performRequestUrl(javax.servlet.http.HttpServletRequest request, String originalUrl)
Performs request and an original url.void
setUser(UserDetail user)
Sets the user.UserCanTryAgainToLoginVerifier
verify()
Verify user connection attempts and block user account if necessary.
-
-
-
Field Detail
-
settings
protected static final SettingBundle settings
-
otherSettings
protected static final SettingBundle otherSettings
-
-
Method Detail
-
isActivated
public boolean isActivated()
Indicates if the verifier is activated.- Returns:
-
performRequestUrl
public String performRequestUrl(javax.servlet.http.HttpServletRequest request, String originalUrl)
Performs request and an original url.- Parameters:
request
-originalUrl
-- Returns:
-
getMessage
public String getMessage()
Gets (warning) message the message according to connection attempts.- Returns:
-
getErrorDestination
public String getErrorDestination()
Gets the error destination.- Returns:
-
verify
public UserCanTryAgainToLoginVerifier verify() throws AuthenticationNoMoreUserConnectionAttemptException
Verify user connection attempts and block user account if necessary.
-
clearCache
public UserCanTryAgainToLoginVerifier clearCache()
Clearing the cache associated to the user.
-
clearSession
public UserCanTryAgainToLoginVerifier clearSession(javax.servlet.http.HttpServletRequest request)
Clearing the HTTP session.
-
get
protected static UserCanTryAgainToLoginVerifier get(UserDetail user)
Gets user connection attempt handling.- Parameters:
user
-- Returns:
-
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
-
-