com.atlassian.crowd.integration.acegi
Class RemoteCrowdAuthenticationProvider
java.lang.Object
com.atlassian.crowd.integration.acegi.CrowdAuthenticationProvider
com.atlassian.crowd.integration.acegi.RemoteCrowdAuthenticationProvider
- All Implemented Interfaces:
- org.acegisecurity.providers.AuthenticationProvider
public class RemoteCrowdAuthenticationProvider
- extends CrowdAuthenticationProvider
A concrete implementation of the CrowdAuthenticationProvider that uses
the crowd client libraries (SOAP) to communicate with the Crowd server.
This should be the class developers use to integrate Crowd and Acegi.
|
Method Summary |
protected java.lang.String |
authenticate(java.lang.String username,
java.lang.String password,
ValidationFactor[] validationFactors)
Authenticate a remote user and return the Crowd SSO token string. |
protected boolean |
isAuthenticated(java.lang.String token,
ValidationFactor[] validationFactors)
Determine if a remote user is authenticated via SSO based on
the supplied SSO token string and validation factors. |
protected CrowdUserDetails |
loadUserByToken(java.lang.String token)
Retrieve a user from Crowd by looking up the principal by their authenticated Crowd token. |
protected CrowdUserDetails |
loadUserByUsername(java.lang.String username)
Retreive the user details for a user based on their username. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
authenticationManager
protected final AuthenticationManager authenticationManager
httpAuthenticator
protected final HttpAuthenticator httpAuthenticator
userDetailsService
protected final CrowdUserDetailsService userDetailsService
RemoteCrowdAuthenticationProvider
public RemoteCrowdAuthenticationProvider(AuthenticationManager authenticationManager,
HttpAuthenticator httpAuthenticator,
CrowdUserDetailsService userDetailsService)
isAuthenticated
protected boolean isAuthenticated(java.lang.String token,
ValidationFactor[] validationFactors)
throws InvalidAuthorizationTokenException,
java.rmi.RemoteException,
ApplicationAccessDeniedException
- Description copied from class:
CrowdAuthenticationProvider
- Determine if a remote user is authenticated via SSO based on
the supplied SSO token string and validation factors.
- Specified by:
isAuthenticated in class CrowdAuthenticationProvider
- Parameters:
token - Crowd SSO token.validationFactors - validation factors.
- Returns:
true iff the remote user is authenticated.
- Throws:
InvalidAuthorizationTokenException - invalid application client.
java.rmi.RemoteException - Crowd server error.
ApplicationAccessDeniedException - user does not have access to the application.
authenticate
protected java.lang.String authenticate(java.lang.String username,
java.lang.String password,
ValidationFactor[] validationFactors)
throws InvalidAuthorizationTokenException,
InvalidAuthenticationException,
java.rmi.RemoteException,
InactiveAccountException,
ApplicationAccessDeniedException
- Description copied from class:
CrowdAuthenticationProvider
- Authenticate a remote user and return the Crowd SSO token string.
- Specified by:
authenticate in class CrowdAuthenticationProvider
- Parameters:
username - username of the remote user.password - password of the remote user.validationFactors - validation factors from the remote user.
- Returns:
- Crowd SSO token string
- Throws:
InvalidAuthorizationTokenException - invalid application client.
InvalidAuthenticationException - invalid username/password.
java.rmi.RemoteException - Crowd server error.
InactiveAccountException - inactive user account.
ApplicationAccessDeniedException - user does not have access to the application.
loadUserByUsername
protected CrowdUserDetails loadUserByUsername(java.lang.String username)
throws org.acegisecurity.userdetails.UsernameNotFoundException,
org.springframework.dao.DataAccessException
- Description copied from class:
CrowdAuthenticationProvider
- Retreive the user details for a user based on their username.
- Specified by:
loadUserByUsername in class CrowdAuthenticationProvider
- Parameters:
username - username of user.
- Returns:
- user details of user.
- Throws:
org.acegisecurity.userdetails.UsernameNotFoundException - user with supplied username does not exist.
org.springframework.dao.DataAccessException - error retrieving user.
loadUserByToken
protected CrowdUserDetails loadUserByToken(java.lang.String token)
throws CrowdSSOTokenInvalidException,
org.springframework.dao.DataAccessException
- Description copied from class:
CrowdAuthenticationProvider
- Retrieve a user from Crowd by looking up the principal by their authenticated Crowd token.
- Specified by:
loadUserByToken in class CrowdAuthenticationProvider
- Parameters:
token - Crowd SSO token string.
- Returns:
- CrowdUserDetails corresponding to the principal.
- Throws:
CrowdSSOTokenInvalidException - if the provided token is invalid.
org.springframework.dao.DataAccessException - error retrieveing user.
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.