public class CrowdUserDetailsServiceImpl extends Object implements CrowdUserDetailsService
| Constructor and Description |
|---|
CrowdUserDetailsServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAdminAuthority()
Return the name of the admin authority.
|
String |
getAuthorityPrefix()
Return the authority prefix applied to group names
the principal is a member of when generating the
GrantedAuthority[] and no authorityMap is set.
|
Iterable<Map.Entry<String,String>> |
getGroupToAuthorityMappings()
Return the group-to-authority mappings
|
CrowdUserDetails |
loadUserByToken(String token)
Retrieve a user from Crowd by looking up the principal by their authenticated Crowd token.
|
CrowdUserDetails |
loadUserByUsername(String username)
Retrieves the user from Crowd by looking up the principal by username.
|
void |
setAdminAuthority(String adminAuthority)
Set the name of the admin authority.
|
void |
setAuthorityPrefix(String authorityPrefix)
Set the authority prefix applied to group names
the principal is a member of when generating the
GrantedAuthority[] and no authorityMap is set,
e.g.
|
void |
setCrowdClient(CrowdClient crowdClient) |
void |
setGroupToAuthorityMappings(Iterable<Map.Entry<String,String>> groupToAuthorityMappings)
Set the authority mappings.
|
void |
setUserAuthoritiesProvider(UserAuthoritiesProvider userAuthoritiesProvider)
Set a User to Authorities provider, eg.
|
public CrowdUserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
CrowdUserDetailsServiceloadUserByUsername in interface CrowdUserDetailsServiceloadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceusername - username of the principal.org.springframework.dao.DataAccessException - thrown if there was an underlying problem while communicating with the Crowd server.org.springframework.security.core.userdetails.UsernameNotFoundExceptionpublic CrowdUserDetails loadUserByToken(String token) throws CrowdSSOTokenInvalidException, org.springframework.dao.DataAccessException
CrowdUserDetailsServiceloadUserByToken in interface CrowdUserDetailsServicetoken - Crowd SSO token string.org.springframework.dao.DataAccessException - thrown if there was an underlying problem while communicating with the Crowd server.CrowdSSOTokenInvalidExceptionpublic String getAuthorityPrefix()
CrowdUserDetailsServicegetAuthorityPrefix in interface CrowdUserDetailsServicepublic void setAuthorityPrefix(String authorityPrefix)
CrowdUserDetailsServicesetAuthorityPrefix in interface CrowdUserDetailsServiceauthorityPrefix - prefix to apply. The default
is no prefix.public Iterable<Map.Entry<String,String>> getGroupToAuthorityMappings()
CrowdUserDetailsServicegetGroupToAuthorityMappings in interface CrowdUserDetailsServicepublic void setGroupToAuthorityMappings(Iterable<Map.Entry<String,String>> groupToAuthorityMappings)
CrowdUserDetailsServiceVersions of Crowd prior to 2.6 used to have a configurable authoritySuffix parameter which has been replaced by these mappings.
setGroupToAuthorityMappings in interface CrowdUserDetailsServicegroupToAuthorityMappings - authority mappings. If absent, an authority prefix is used.public void setUserAuthoritiesProvider(UserAuthoritiesProvider userAuthoritiesProvider)
userAuthoritiesProvider - the implementation to usepublic String getAdminAuthority()
CrowdUserDetailsServicegetAdminAuthority in interface CrowdUserDetailsServicepublic void setAdminAuthority(String adminAuthority)
setAdminAuthority in interface CrowdUserDetailsServiceadminAuthority - name of the admin authority. The default is ROLE_ADMIN.public void setCrowdClient(CrowdClient crowdClient)
Copyright © 2019 Atlassian. All rights reserved.