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. SeeDefaultSignupManager
- Since:
- 5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
clearAllExpiredTokens()
void
clearToken(String userName)
Clear the token regardless of the token typevoid
clearToken(String userName, UserVerificationTokenType tokenType)
String
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 Detail
-
generateAndSaveToken
String generateAndSaveToken(String userName, UserVerificationTokenType tokenType)
-
hasToken
boolean hasToken(String userName, UserVerificationTokenType tokenType)
-
hasValidUserToken
boolean hasValidUserToken(String userName, UserVerificationTokenType tokenType, String token)
-
isFresh
boolean isFresh(UserVerificationToken token)
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
void clearToken(String userName, UserVerificationTokenType tokenType)
-
hasOutdatedUserToken
boolean hasOutdatedUserToken(String userName, UserVerificationTokenType tokenType)
-
clearToken
void clearToken(String userName)
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
-
-