public class DefaultSecureUserTokenManager extends Object implements SecureUserTokenManager
SecureUserTokenManager} for details
SecureUserTokenManager.TokenType
Constructor and Description |
---|
DefaultSecureUserTokenManager(com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
String |
generateToken(ApplicationUser user,
SecureUserTokenManager.TokenType tokenType)
Given a user and tokentype this method creates a new secure token and returns this token.
|
void |
onClearCache(ClearCacheEvent event) |
ApplicationUser |
useToken(String token,
SecureUserTokenManager.TokenType tokenType)
Given a token and tokenType, this method returns the User that was mapped to this token and then revokes the
token to ensure it can't be used again.
|
public DefaultSecureUserTokenManager(com.atlassian.cache.CacheManager cacheManager)
public String generateToken(ApplicationUser user, SecureUserTokenManager.TokenType tokenType)
SecureUserTokenManager
generateToken
in interface SecureUserTokenManager
user
- The user this token is fortokenType
- The SecureUserTokenManager.TokenType
for this tokenpublic ApplicationUser useToken(String token, SecureUserTokenManager.TokenType tokenType)
SecureUserTokenManager
useToken
in interface SecureUserTokenManager
token
- A secure tokentokenType
- The SecureUserTokenManager.TokenType
for this token@EventListener public void onClearCache(ClearCacheEvent event)
Copyright © 2002-2019 Atlassian. All Rights Reserved.