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 String |
authenticateWithoutPassword(String username,
List<ValidationFactor> validationFactors)
Authenticate a remote user without password 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, authenticateCrowdRememberedUsername, authenticateCrowdSSO, authenticateUsernamePassword, supports, supports, translateException
protected 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
CrowdAuthenticationProvider
isAuthenticated
in class CrowdAuthenticationProvider
token
- Crowd SSO token.validationFactors
- validation factors.true
iff the remote user is authenticated.OperationFailedException
InvalidAuthenticationException
ApplicationPermissionException
protected String authenticate(String username, String password, List<ValidationFactor> validationFactors) throws InactiveAccountException, ExpiredCredentialException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException, ApplicationAccessDeniedException
CrowdAuthenticationProvider
authenticate
in class CrowdAuthenticationProvider
username
- username of the remote user.password
- password of the remote user.validationFactors
- validation factors from the remote user.InvalidAuthenticationException
- invalid username/password.InactiveAccountException
ExpiredCredentialException
ApplicationPermissionException
OperationFailedException
ApplicationAccessDeniedException
protected String authenticateWithoutPassword(String username, List<ValidationFactor> validationFactors) throws InactiveAccountException, ExpiredCredentialException, ApplicationPermissionException, InvalidAuthenticationException, OperationFailedException, ApplicationAccessDeniedException
CrowdAuthenticationProvider
authenticateWithoutPassword
in class CrowdAuthenticationProvider
username
- username of the remote user.validationFactors
- validation factors from the remote user.InvalidAuthenticationException
- invalid username.InactiveAccountException
ExpiredCredentialException
ApplicationPermissionException
OperationFailedException
ApplicationAccessDeniedException
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 © 2021 Atlassian. All rights reserved.