Package com.atlassian.confluence.user
Interface UserVerificationTokenManager
- All Known Implementing Classes:
DefaultUserVerificationTokenManager
@Transactional
public interface UserVerificationTokenManager
Provides "secure token" services that can be assigned to users and later verified.
See
DefaultSignupManager
- Since:
- 5.2
-
Method Summary
Modifier and TypeMethodDescriptionint
void
clearToken
(String userName) Clear the token regardless of the token typevoid
clearToken
(String userName, UserVerificationTokenType tokenType) generateAndSaveToken
(String userName, UserVerificationTokenType tokenType) boolean
hasOutdatedUserToken
(String userName, UserVerificationTokenType tokenType) boolean
hasToken
(String userName, UserVerificationTokenType tokenType) boolean
hasValidUserToken
(String userName, UserVerificationTokenType tokenType, String token) boolean
isFresh
(UserVerificationToken token) Check if the token is fresh
-
Method Details
-
generateAndSaveToken
-
hasToken
-
hasValidUserToken
-
isFresh
Check if the token is fresh- Parameters:
token
- the token to be checked against- Returns:
- true if the token is not expired
- Since:
- 8.2.0
-
clearToken
-
hasOutdatedUserToken
-
clearToken
Clear the token regardless of the token type- Parameters:
userName
- the token associated to the username- Since:
- 8.2.0
-
clearAllExpiredTokens
int clearAllExpiredTokens()- Returns:
- the number of expired tokens that have been cleared
- Since:
- 8.2.0
-