public class RemoteCrowdAuthenticationProvider extends CrowdAuthenticationProvider
Modifier and Type | Field and Description |
---|---|
protected AuthenticationManager |
authenticationManager |
protected HttpAuthenticator |
httpAuthenticator |
protected CrowdUserDetailsService |
userDetailsService |
applicationName
Constructor and Description |
---|
RemoteCrowdAuthenticationProvider(AuthenticationManager authenticationManager,
HttpAuthenticator httpAuthenticator,
CrowdUserDetailsService userDetailsService) |
Modifier and Type | Method and Description |
---|---|
protected String |
authenticate(String username,
String password,
ValidationFactor[] validationFactors)
Authenticate a remote user and return the Crowd SSO token string.
|
protected boolean |
isAuthenticated(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(String token)
Retrieve a user from Crowd by looking up the principal by their authenticated Crowd token.
|
protected CrowdUserDetails |
loadUserByUsername(String username)
Retreive the user details for a user based on their username.
|
authenticate, authenticateCrowdSSO, authenticateUsernamePassword, supports, supports, translateException
protected final AuthenticationManager authenticationManager
protected final HttpAuthenticator httpAuthenticator
protected final CrowdUserDetailsService userDetailsService
public RemoteCrowdAuthenticationProvider(AuthenticationManager authenticationManager, HttpAuthenticator httpAuthenticator, CrowdUserDetailsService userDetailsService)
protected boolean isAuthenticated(String token, ValidationFactor[] validationFactors) throws InvalidAuthorizationTokenException, RemoteException, ApplicationAccessDeniedException, InvalidAuthenticationException
CrowdAuthenticationProvider
isAuthenticated
in class CrowdAuthenticationProvider
token
- Crowd SSO token.validationFactors
- validation factors.true
iff the remote user is authenticated.InvalidAuthorizationTokenException
- invalid application client.RemoteException
- Crowd server error.ApplicationAccessDeniedException
- user does not have access to the application.InvalidAuthenticationException
protected String authenticate(String username, String password, ValidationFactor[] validationFactors) throws InvalidAuthorizationTokenException, InvalidAuthenticationException, RemoteException, InactiveAccountException, ApplicationAccessDeniedException, ExpiredCredentialException
CrowdAuthenticationProvider
authenticate
in class CrowdAuthenticationProvider
username
- username of the remote user.password
- password of the remote user.validationFactors
- validation factors from the remote user.InvalidAuthorizationTokenException
- invalid application client.InvalidAuthenticationException
- invalid username/password.RemoteException
- Crowd server error.InactiveAccountException
- inactive user account.ApplicationAccessDeniedException
- user does not have access to the application.ExpiredCredentialException
- The user's credentials have expired. The user must change their credentials in order to successfully authenticate.protected CrowdUserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
CrowdAuthenticationProvider
loadUserByUsername
in class CrowdAuthenticationProvider
username
- username of user.org.springframework.security.core.userdetails.UsernameNotFoundException
- user with supplied username does not exist.org.springframework.dao.DataAccessException
- error retrieving user.protected CrowdUserDetails loadUserByToken(String token) throws CrowdSSOTokenInvalidException, org.springframework.dao.DataAccessException
CrowdAuthenticationProvider
loadUserByToken
in class CrowdAuthenticationProvider
token
- Crowd SSO token string.CrowdSSOTokenInvalidException
- if the provided token is invalid.org.springframework.dao.DataAccessException
- error retrieveing user.Copyright © 2013 Atlassian. All Rights Reserved.