org.silverpeas.authentication.verifier
Class UserCanTryAgainToLoginVerifier

java.lang.Object
  extended by org.silverpeas.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
protected static Map<String,ResourceLocator> multilang
           
protected static ResourceLocator otherSettings
           
protected static ResourceLocator settings
           
 
Method Summary
 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)
          Gets a string message according to the given language.
 UserDetail getUser()
          Gets the user.
protected static UserDetail getUserByCredential(AuthenticationCredential credential)
          Gets a user from its credentials.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

multilang

protected static final Map<String,ResourceLocator> multilang

settings

protected static final ResourceLocator settings

otherSettings

protected static final ResourceLocator 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.

Throws:
AuthenticationNoMoreUserConnectionAttemptException

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 -

getUser

public UserDetail getUser()
Gets the user.

Returns:

getUserByCredential

protected static UserDetail getUserByCredential(AuthenticationCredential credential)
Gets a user from its credentials.

Parameters:
credential -
Returns:
Throws:
AuthenticationException

getUserById

protected static UserDetail getUserById(String userId)
Gets a user from its identifier.

Parameters:
userId -
Returns:

getString

protected static String getString(String key,
                                  String language,
                                  String... params)
Gets a string message according to the given language.

Parameters:
key -
language -
params -
Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.