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 log in one more time after a login error.- Author:
- Yohann Chastagnier Date: 05/02/13
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.silverpeas.kernel.bundle.SettingBundleotherSettingsprotected static org.silverpeas.kernel.bundle.SettingBundlesettings
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UserCanTryAgainToLoginVerifierclearCache()Clearing the cache associated to the user.voidclearSession(javax.servlet.http.HttpServletRequest request)Clearing the HTTP session.protected static UserCanTryAgainToLoginVerifierget(User user)Gets a verifier of user connection for the specified user.StringgetErrorDestination()Gets the error destination.StringgetMessage()Gets the (warning) message according to connection attempts.protected static StringgetString(String key, String language, String... params)UsergetUser()Gets the user.protected static UserDetailgetUserById(String userId)Gets a user from its identifier.booleanisActivated()Indicates if the verifier is activated.StringperformRequestUrl(javax.servlet.http.HttpServletRequest request, String originalUrl)Performs request and an original url.voidsetUser(User user)Sets the user.UserCanTryAgainToLoginVerifierverify()Verify user connection attempts and block user account if necessary.
 
- 
- 
- 
Method Detail- 
isActivatedpublic boolean isActivated() Indicates if the verifier is activated.- Returns:
- true if this verifier has to be used. False otherwise.
 
 - 
performRequestUrlpublic String performRequestUrl(javax.servlet.http.HttpServletRequest request, String originalUrl) Performs request and an original url.- Parameters:
- request- the incoming HTTP request for login.
- originalUrl- the URL at which the user should be directed if all is ok.
- Returns:
- the actual destination URL once this verifier completed its work.
 
 - 
getMessagepublic String getMessage() Gets the (warning) message according to connection attempts.- Returns:
- the message to render to the user for its login attempt.
 
 - 
getErrorDestinationpublic String getErrorDestination() Gets the error destination.- Returns:
- relative URL of the web page for login errors.
 
 - 
verifypublic UserCanTryAgainToLoginVerifier verify() throws AuthenticationNoMoreUserConnectionAttemptException Verify user connection attempts and block user account if necessary.
 - 
clearCachepublic UserCanTryAgainToLoginVerifier clearCache() Clearing the cache associated to the user.
 - 
clearSessionpublic void clearSession(javax.servlet.http.HttpServletRequest request) Clearing the HTTP session.
 - 
getprotected static UserCanTryAgainToLoginVerifier get(User user) Gets a verifier of user connection for the specified user.- Parameters:
- user- the user behind the login attempt.
- Returns:
- an instance of this verifier for the given user.
 
 - 
setUserpublic void setUser(User user) Sets the user.- Parameters:
- user- the user to set
 
 - 
getUserpublic User getUser() Gets the user.- Returns:
- the user
 
 - 
getUserByIdprotected static UserDetail getUserById(String userId) Gets a user from its identifier.- Parameters:
- userId- the unique identifier of the user
- Returns:
- the user
 
 
- 
 
-