Package com.atlassian.confluence.user
Interface UserVerificationTokenManager
-
- All Known Implementing Classes:
DefaultUserVerificationTokenManager
@Transactional public interface UserVerificationTokenManagerProvides "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 intclearAllExpiredTokens()voidclearToken(String userName)Clear the token regardless of the token typevoidclearToken(String userName, UserVerificationTokenType tokenType)StringgenerateAndSaveToken(String userName, UserVerificationTokenType tokenType)booleanhasOutdatedUserToken(String userName, UserVerificationTokenType tokenType)booleanhasToken(String userName, UserVerificationTokenType tokenType)booleanhasValidUserToken(String userName, UserVerificationTokenType tokenType, String token)booleanisFresh(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
-
-