com.atlassian.jira.user
Class DefaultSecureUserTokenManager
java.lang.Object
com.atlassian.jira.user.DefaultSecureUserTokenManager
- All Implemented Interfaces:
- Startable, SecureUserTokenManager
public class DefaultSecureUserTokenManager
- extends Object
- implements SecureUserTokenManager, Startable
- See Also:
SecureUserTokenManager} for details
|
Method Summary |
String |
generateToken(com.atlassian.crowd.embedded.api.User user,
SecureUserTokenManager.TokenType tokenType)
Given a user and tokentype this method creates a new secure token and returns this token. |
void |
onClearCache(ClearCacheEvent event)
|
void |
start()
This method wil be called after the plugin system is fully initialised and all components added to the
dependency injection framework. |
com.atlassian.crowd.embedded.api.User |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultSecureUserTokenManager
public DefaultSecureUserTokenManager(com.atlassian.event.api.EventPublisher eventPublisher)
generateToken
public String generateToken(com.atlassian.crowd.embedded.api.User user,
SecureUserTokenManager.TokenType tokenType)
- Description copied from interface:
SecureUserTokenManager
- Given a user and tokentype this method creates a new secure token and returns this token. A particular user can
have multiple tokens mapped at any given time.
- Specified by:
generateToken in interface SecureUserTokenManager
- Parameters:
user - The user this token is fortokenType - The SecureUserTokenManager.TokenType for this token
- Returns:
- A new token or null if no user was provided
useToken
public com.atlassian.crowd.embedded.api.User useToken(String token,
SecureUserTokenManager.TokenType tokenType)
- Description copied from interface:
SecureUserTokenManager
- 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.
- Specified by:
useToken in interface SecureUserTokenManager
- Parameters:
token - A secure tokentokenType - The SecureUserTokenManager.TokenType for this token
- Returns:
- The User mapped to this token, or null if no mapping can be found.
start
public void start()
throws Exception
- Description copied from interface:
Startable
- This method wil be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
- Specified by:
start in interface Startable
- Throws:
Exception - Allows implementations to throw an Exception.
onClearCache
@EventListener
public void onClearCache(ClearCacheEvent event)
Copyright © 2002-2011 Atlassian. All Rights Reserved.