com.atlassian.crowd.integration.service
Interface AuthenticationManager

All Known Implementing Classes:
AuthenticationManagerImpl

public interface AuthenticationManager

Used by applications that only need user authentication and validation services.


Method Summary
 java.lang.String authenticate(java.lang.String username, java.lang.String password)
          Authenticates a user, using just a username and password.
 java.lang.String authenticate(UserAuthenticationContext authenticationContext)
          Authenticate a user.
 SecurityServerClient getSecurityServerClient()
          Returns an instance of the SecurityServerClient, for when you need more API access than the authentication manager provides.
 void invalidate(java.lang.String token)
          Marks the presented token as invalid, meaning that the principal it represents is no longer authenticated.
 boolean isAuthenticated(java.lang.String token, ValidationFactor[] validationFactors)
          Checks that the token (as returned from authenticate() is still valid, given the validation factors.
 

Method Detail

authenticate

java.lang.String authenticate(UserAuthenticationContext authenticationContext)
                              throws java.rmi.RemoteException,
                                     InvalidAuthorizationTokenException,
                                     InvalidAuthenticationException,
                                     InactiveAccountException,
                                     ApplicationAccessDeniedException
Authenticate a user. The PrincipalAuthenticationContext contains the details of who they are, the credentials they're presenting, and where they're coming from. If the authenticationContext does not contain application details, they will be added using details provided by the SecurityServerClient.

Parameters:
authenticationContext - The details of the user that is to be authenticated.
Returns:
Returns an authorization token if successful.
Throws:
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidAuthenticationException - The user was not successfully authenticated.
InactiveAccountException - The user's account is inactive and they are not be allowed to authenticate.
ApplicationAccessDeniedException

authenticate

java.lang.String authenticate(java.lang.String username,
                              java.lang.String password)
                              throws java.rmi.RemoteException,
                                     InvalidAuthorizationTokenException,
                                     InvalidAuthenticationException,
                                     InactiveAccountException,
                                     ApplicationAccessDeniedException
Authenticates a user, using just a username and password.

Parameters:
username -
password -
Returns:
Returns an authorization token if successful.
Throws:
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
InvalidAuthenticationException - The user was not successfully authenticated.
InactiveAccountException - The user's account is inactive and they are not be allowed to authenticate.
ApplicationAccessDeniedException

isAuthenticated

boolean isAuthenticated(java.lang.String token,
                        ValidationFactor[] validationFactors)
                        throws java.rmi.RemoteException,
                               InvalidAuthorizationTokenException,
                               ApplicationAccessDeniedException
Checks that the token (as returned from authenticate() is still valid, given the validation factors.

Parameters:
token - The token presented by the user as evidence of their authenticity
validationFactors - Details of where the user's come from. If presented, must match those presented during authentication.
Returns:
true if the user is still authenticated, false if not.
Throws:
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
ApplicationAccessDeniedException

invalidate

void invalidate(java.lang.String token)
                throws java.rmi.RemoteException,
                       InvalidAuthorizationTokenException
Marks the presented token as invalid, meaning that the principal it represents is no longer authenticated. Usually used to make the user logged-off.

Parameters:
token - The token presented by the user, as returned from authenticate()
Throws:
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.

getSecurityServerClient

SecurityServerClient getSecurityServerClient()
Returns an instance of the SecurityServerClient, for when you need more API access than the authentication manager provides.

Returns:


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.