com.atlassian.jira.rpc.auth
Class TokenManagerImpl

java.lang.Object
  extended by com.atlassian.jira.rpc.auth.TokenManagerImpl
All Implemented Interfaces:
TokenManager

public class TokenManagerImpl
extends Object
implements TokenManager


Field Summary
static long DEFAULT_TIMEOUT
           
 
Constructor Summary
TokenManagerImpl(long timeout, com.atlassian.jira.security.PermissionManager permissionManager)
           
TokenManagerImpl(com.atlassian.jira.security.PermissionManager permissionManager)
           
 
Method Summary
 String login(String username, String password)
           
 boolean logout(String token)
           
 User retrieveUser(String token)
          Retrieve the user, checking that the token is valid, and that the user has the 'USE' permission
 User retrieveUserNoPermissionCheck(String token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static long DEFAULT_TIMEOUT
Constructor Detail

TokenManagerImpl

public TokenManagerImpl(com.atlassian.jira.security.PermissionManager permissionManager)

TokenManagerImpl

public TokenManagerImpl(long timeout,
                        com.atlassian.jira.security.PermissionManager permissionManager)
Method Detail

login

public String login(String username,
                    String password)
             throws RemoteException,
                    RemoteAuthenticationException
Specified by:
login in interface TokenManager
Throws:
RemoteException
RemoteAuthenticationException

logout

public boolean logout(String token)
Specified by:
logout in interface TokenManager

retrieveUser

public User retrieveUser(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 User retrieveUserNoPermissionCheck(String token)
                                   throws RemoteAuthenticationException,
                                          RemotePermissionException
Specified by:
retrieveUserNoPermissionCheck in interface TokenManager
Throws:
RemoteAuthenticationException
RemotePermissionException


Copyright © 2004-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.