public interface CrowdUserDetailsService
extends org.springframework.security.core.userdetails.UserDetailsService
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 |
setGroupToAuthorityMappings(Iterable<Map.Entry<String,String>> groupToAuthorityMappings)
Set the authority mappings.
|
CrowdUserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
loadUserByUsername
in interface org.springframework.security.core.userdetails.UserDetailsService
username
- username of the principal.org.springframework.security.userdetails.UsernameNotFoundException
- thrown if a principal with the requested username cannot be found in Crowd.org.springframework.dao.DataAccessException
- thrown if there was an underlying problem while communicating with the Crowd server.org.springframework.security.core.userdetails.UsernameNotFoundException
CrowdUserDetails loadUserByToken(String token) throws CrowdSSOTokenInvalidException, org.springframework.dao.DataAccessException
token
- Crowd SSO token string.com.atlassian.crowd.integration.springframework.security.CrowdSSOTokenInvalidException
- if the provided token is invalid.org.springframework.dao.DataAccessException
- thrown if there was an underlying problem while communicating with the Crowd server.CrowdSSOTokenInvalidException
String getAuthorityPrefix()
void setAuthorityPrefix(String authorityPrefix)
authorityPrefix
- prefix to apply. The default
is no prefix.Iterable<Map.Entry<String,String>> getGroupToAuthorityMappings()
void setGroupToAuthorityMappings(Iterable<Map.Entry<String,String>> groupToAuthorityMappings)
Versions of Crowd prior to 2.6 used to have a configurable authoritySuffix parameter which has been replaced by these mappings.
groupToAuthorityMappings
- authority mappings. If absent, an authority prefix is used.String getAdminAuthority()
void setAdminAuthority(String adminAuthority)
adminAuthority
- name of the admin authority. The default is ROLE_ADMIN.Copyright © 2020 Atlassian. All rights reserved.