com.atlassian.crowd.plugin.application.acegi
Class LocalCrowdAuthenticationProvider
java.lang.Object
com.atlassian.crowd.integration.acegi.CrowdAuthenticationProvider
com.atlassian.crowd.plugin.application.acegi.LocalCrowdAuthenticationProvider
- All Implemented Interfaces:
- org.acegisecurity.providers.AuthenticationProvider
public class LocalCrowdAuthenticationProvider
- extends CrowdAuthenticationProvider
Application-aware local authentication provider.
Does not make SOAP calls.
|
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 Application |
getApplication()
|
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 |
LocalCrowdAuthenticationProvider
public LocalCrowdAuthenticationProvider(Application application,
ApplicationService applicationService,
ApplicationManager applicationManager,
DirectoryManager directoryManager)
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.
getApplication
protected Application getApplication()
throws ObjectNotFoundException
- Throws:
ObjectNotFoundException
Copyright © 2008 Atlassian Pty Ltd. All Rights Reserved.