public class RemoteCrowdAuthenticationProvider extends CrowdAuthenticationProvider
This should be the class developers use to integrate Crowd and Spring Security.
| Modifier and Type | Field and Description |
|---|---|
protected CrowdClient |
authenticationManager |
protected CrowdHttpAuthenticator |
httpAuthenticator |
protected CrowdUserDetailsService |
userDetailsService |
| Constructor and Description |
|---|
RemoteCrowdAuthenticationProvider(CrowdClient authenticationManager,
CrowdHttpAuthenticator httpAuthenticator,
CrowdUserDetailsService userDetailsService) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
authenticate(String username,
String password,
List<ValidationFactor> validationFactors)
Authenticate a remote user and return the Crowd SSO token string.
|
protected boolean |
isAuthenticated(String token,
List<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, translateExceptionprotected final CrowdClient authenticationManager
protected final CrowdHttpAuthenticator httpAuthenticator
protected final CrowdUserDetailsService userDetailsService
public RemoteCrowdAuthenticationProvider(CrowdClient authenticationManager, CrowdHttpAuthenticator httpAuthenticator, CrowdUserDetailsService userDetailsService)
protected boolean isAuthenticated(String token, List<ValidationFactor> validationFactors) throws OperationFailedException, InvalidAuthenticationException, ApplicationPermissionException
CrowdAuthenticationProviderisAuthenticated in class CrowdAuthenticationProvidertoken - Crowd SSO token.validationFactors - validation factors.true iff the remote user is authenticated.OperationFailedExceptionInvalidAuthenticationExceptionApplicationPermissionExceptionprotected String authenticate(String username, String password, List<ValidationFactor> validationFactors) throws InactiveAccountException, ExpiredCredentialException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException, ApplicationAccessDeniedException
CrowdAuthenticationProviderauthenticate in class CrowdAuthenticationProviderusername - username of the remote user.password - password of the remote user.validationFactors - validation factors from the remote user.InvalidAuthenticationException - invalid username/password.InactiveAccountExceptionExpiredCredentialExceptionApplicationPermissionExceptionOperationFailedExceptionApplicationAccessDeniedExceptionprotected CrowdUserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
CrowdAuthenticationProviderloadUserByUsername in class CrowdAuthenticationProviderusername - 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
CrowdAuthenticationProviderloadUserByToken in class CrowdAuthenticationProvidertoken - Crowd SSO token string.CrowdSSOTokenInvalidException - if the provided token is invalid.org.springframework.dao.DataAccessException - error retrieveing user.Copyright © 2018 Atlassian. All rights reserved.