public abstract class LocalCrowdAuthenticationProvider extends CrowdAuthenticationProvider
Does not make SOAP calls.
Modifier and Type | Field and Description |
---|---|
protected ApplicationService |
applicationService |
Constructor and Description |
---|
LocalCrowdAuthenticationProvider(ApplicationService applicationService,
ApplicationManager applicationManager,
TokenAuthenticationManager tokenAuthenticationManager) |
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 abstract org.springframework.security.core.GrantedAuthority[] |
findGrantedAuthorities(String username) |
protected Application |
getApplication() |
protected abstract String |
getApplicationName() |
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 tokenKey)
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.
|
boolean |
supports(org.springframework.security.authentication.AbstractAuthenticationToken authenticationToken) |
authenticate, authenticateCrowdRememberedUsername, authenticateCrowdSSO, authenticateUsernamePassword, supports, translateException
protected final ApplicationService applicationService
public LocalCrowdAuthenticationProvider(ApplicationService applicationService, ApplicationManager applicationManager, TokenAuthenticationManager tokenAuthenticationManager)
protected boolean isAuthenticated(String token, List<ValidationFactor> validationFactors) throws OperationFailedException
CrowdAuthenticationProvider
isAuthenticated
in class CrowdAuthenticationProvider
token
- Crowd SSO token.validationFactors
- validation factors.true
iff the remote user is authenticated.OperationFailedException
protected String authenticate(String username, String password, List<ValidationFactor> validationFactors) throws InvalidAuthenticationException, InactiveAccountException, ApplicationAccessDeniedException, ExpiredCredentialException, OperationFailedException
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
ApplicationAccessDeniedException
ExpiredCredentialException
OperationFailedException
protected String authenticateWithoutPassword(String username, List<ValidationFactor> validationFactors) throws InvalidAuthenticationException, InactiveAccountException, ApplicationAccessDeniedException, ExpiredCredentialException, OperationFailedException
CrowdAuthenticationProvider
authenticateWithoutPassword
in class CrowdAuthenticationProvider
username
- username of the remote user.validationFactors
- validation factors from the remote user.InvalidAuthenticationException
- invalid username.InactiveAccountException
ApplicationAccessDeniedException
ExpiredCredentialException
OperationFailedException
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 tokenKey) throws CrowdSSOTokenInvalidException, org.springframework.dao.DataAccessException
CrowdAuthenticationProvider
loadUserByToken
in class CrowdAuthenticationProvider
tokenKey
- Crowd SSO token string.CrowdSSOTokenInvalidException
- if the provided token is
invalid.org.springframework.dao.DataAccessException
- error retrieveing user.protected abstract org.springframework.security.core.GrantedAuthority[] findGrantedAuthorities(String username) throws ApplicationNotFoundException
ApplicationNotFoundException
protected Application getApplication() throws ApplicationNotFoundException
ApplicationNotFoundException
public boolean supports(org.springframework.security.authentication.AbstractAuthenticationToken authenticationToken)
supports
in class CrowdAuthenticationProvider
protected abstract String getApplicationName()
Copyright © 2020 Atlassian. All rights reserved.