com.atlassian.crowd.plugin.application.springsecurity
Class LocalCrowdAuthenticationProvider
java.lang.Object
com.atlassian.crowd.integration.springsecurity.CrowdAuthenticationProvider
com.atlassian.crowd.plugin.application.springsecurity.LocalCrowdAuthenticationProvider
- All Implemented Interfaces:
- org.springframework.security.authentication.AuthenticationProvider
public class LocalCrowdAuthenticationProvider
- extends CrowdAuthenticationProvider
Application-aware local authentication provider.
Does not make SOAP calls.
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,
TokenAuthenticationManager tokenAuthenticationManager)
isAuthenticated
protected boolean isAuthenticated(String token,
ValidationFactor[] validationFactors)
throws InvalidAuthorizationTokenException,
ApplicationAccessDeniedException,
RemoteException
- 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.
ApplicationAccessDeniedException
- user does not have access to the application.
RemoteException
- Crowd server error.
authenticate
protected String authenticate(String username,
String password,
ValidationFactor[] validationFactors)
throws InvalidAuthorizationTokenException,
InvalidAuthenticationException,
InactiveAccountException,
ApplicationAccessDeniedException,
RemoteException,
ExpiredCredentialException
- 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.
InactiveAccountException
- inactive user account.
ApplicationAccessDeniedException
- user does not have access to the application.
RemoteException
- Crowd server error.
ExpiredCredentialException
- The user's credentials have expired. The user must change their credentials in order to successfully authenticate.
loadUserByUsername
protected CrowdUserDetails loadUserByUsername(String username)
throws org.springframework.security.core.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.springframework.security.core.userdetails.UsernameNotFoundException
- user with supplied username does not exist.
org.springframework.dao.DataAccessException
- error retrieving user.
loadUserByToken
protected CrowdUserDetails loadUserByToken(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 © 2013 Atlassian. All Rights Reserved.