com.atlassian.jira.rpc.auth
Class TokenManagerImpl
java.lang.Object
com.atlassian.jira.rpc.auth.TokenManagerImpl
- All Implemented Interfaces:
- TokenManager
public class TokenManagerImpl
- extends java.lang.Object
- implements TokenManager
Constructor Summary |
TokenManagerImpl(com.atlassian.jira.security.PermissionManager permissionManager,
com.atlassian.jira.bc.security.login.LoginService loginService,
com.atlassian.jira.security.JiraAuthenticationContext authenticationContext,
com.atlassian.jira.user.util.UserManager userManager)
|
Method Summary |
java.lang.String |
login(java.lang.String username,
java.lang.String password)
|
boolean |
logout(java.lang.String token)
|
com.atlassian.crowd.embedded.api.User |
retrieveUser(java.lang.String token)
Retrieve the user, checking that the token is valid, and that the user has the 'USE' permission |
com.atlassian.crowd.embedded.api.User |
retrieveUserNoPermissionCheck(java.lang.String token)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TIMEOUT
public static long DEFAULT_TIMEOUT
TokenManagerImpl
public TokenManagerImpl(com.atlassian.jira.security.PermissionManager permissionManager,
com.atlassian.jira.bc.security.login.LoginService loginService,
com.atlassian.jira.security.JiraAuthenticationContext authenticationContext,
com.atlassian.jira.user.util.UserManager userManager)
login
public java.lang.String login(java.lang.String username,
java.lang.String password)
throws RemoteException
- Specified by:
login
in interface TokenManager
- Throws:
RemoteException
logout
public boolean logout(java.lang.String token)
- Specified by:
logout
in interface TokenManager
retrieveUser
public com.atlassian.crowd.embedded.api.User retrieveUser(java.lang.String token)
throws RemoteAuthenticationException,
RemotePermissionException
- Description copied from interface:
TokenManager
- Retrieve the user, checking that the token is valid, and that the user has the 'USE' permission
- Specified by:
retrieveUser
in interface TokenManager
- Returns:
- A valid user. Note that this method will never return null
- Throws:
RemoteAuthenticationException
- If the token is not valid, or if it has timed out
RemotePermissionException
- If the user does not have the 'USE' permission.
retrieveUserNoPermissionCheck
public com.atlassian.crowd.embedded.api.User retrieveUserNoPermissionCheck(java.lang.String token)
throws RemoteAuthenticationException,
RemotePermissionException
- Specified by:
retrieveUserNoPermissionCheck
in interface TokenManager
- Throws:
RemoteAuthenticationException
RemotePermissionException
Copyright © 2004-2011 Atlassian. All Rights Reserved.