Class UserMustAcceptTermsOfServiceVerifier
- java.lang.Object
-
- org.silverpeas.core.security.authentication.verifier.UserMustAcceptTermsOfServiceVerifier
-
public class UserMustAcceptTermsOfServiceVerifier extends Object
Class that provides tools to verify if the user must accept terms of service. User: Yohann Chastagnier Date: 10/09/13
-
-
Field Summary
Fields Modifier and Type Field Description static String
ERROR_USER_TOS_REFUSED
static String
ERROR_USER_TOS_TIMEOUT
protected static SettingBundle
otherSettings
protected static SettingBundle
settings
-
Constructor Summary
Constructors Modifier Constructor Description protected
UserMustAcceptTermsOfServiceVerifier(UserDetail user)
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UserMustAcceptTermsOfServiceVerifier
clearCache()
Clearing the cache associated to the verifier.protected static UserMustAcceptTermsOfServiceVerifier
get(String tosToken)
Gets the verifier with the given token.String
getDestination(javax.servlet.http.HttpServletRequest request)
Gets the 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.UserMustAcceptTermsOfServiceVerifier
verify()
Verify user connection attempts and block user account if necessary.
-
-
-
Field Detail
-
ERROR_USER_TOS_REFUSED
public static final String ERROR_USER_TOS_REFUSED
- See Also:
- Constant Field Values
-
ERROR_USER_TOS_TIMEOUT
public static final String ERROR_USER_TOS_TIMEOUT
- See Also:
- Constant Field Values
-
settings
protected static final SettingBundle settings
-
otherSettings
protected static final SettingBundle otherSettings
-
-
Constructor Detail
-
UserMustAcceptTermsOfServiceVerifier
protected UserMustAcceptTermsOfServiceVerifier(UserDetail user)
Default constructor.- Parameters:
user
-
-
-
Method Detail
-
getDestination
public String getDestination(javax.servlet.http.HttpServletRequest request)
Gets the destination.- Returns:
-
verify
public UserMustAcceptTermsOfServiceVerifier verify() throws AuthenticationUserMustAcceptTermsOfService
Verify user connection attempts and block user account if necessary.
-
clearCache
public UserMustAcceptTermsOfServiceVerifier clearCache()
Clearing the cache associated to the verifier.
-
get
protected static UserMustAcceptTermsOfServiceVerifier get(String tosToken)
Gets the verifier with the given token.- Parameters:
tosToken
-- 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
-
-