|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.integration.springsecurity.user.CrowdUserDetailsServiceImpl
public class CrowdUserDetailsServiceImpl
Retrieves users from Crowd using Crowd's remote API.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
CrowdUserDetailsServiceImpl()
|
|
| Method Summary | |
|---|---|
protected org.springframework.security.GrantedAuthority[] |
getAuthorities(java.lang.String username)
Requests the group memberships of the user from the Crowd Server. |
java.lang.String |
getAuthorityPrefix()
Return the authority prefix applied to group names the principal is a member of when generating the GrantedAuthority[]. |
java.lang.String |
getAuthoritySuffix()
Return the authority suffix, e.g. |
CrowdUserDetails |
loadUserByToken(java.lang.String token)
Retrieve a user from Crowd by looking up the principal by their authenticated Crowd token. |
CrowdUserDetails |
loadUserByUsername(java.lang.String username)
Retrieves the user from Crowd by looking up the principal by username. |
void |
setAuthenticationManager(AuthenticationManager authenticationManager)
|
void |
setAuthorityPrefix(java.lang.String authorityPrefix)
Set the authority prefix applied to group names the principal is a member of when generating the GrantedAuthority[]. |
void |
setAuthoritySuffix(java.lang.String authoritySuffix)
Set the authority suffix e.g. |
void |
setGroupMembershipManager(GroupMembershipManager groupMembershipManager)
|
void |
setUserManager(UserManager userManager)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger LOGGER
| Constructor Detail |
|---|
public CrowdUserDetailsServiceImpl()
| Method Detail |
|---|
public CrowdUserDetails loadUserByUsername(java.lang.String username)
throws org.springframework.security.userdetails.UsernameNotFoundException,
org.springframework.dao.DataAccessException
CrowdUserDetailsService
loadUserByUsername in interface CrowdUserDetailsServiceloadUserByUsername in interface org.springframework.security.userdetails.UserDetailsServiceusername - 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.
public CrowdUserDetails loadUserByToken(java.lang.String token)
throws CrowdSSOTokenInvalidException,
org.springframework.dao.DataAccessException
CrowdUserDetailsService
loadUserByToken in interface CrowdUserDetailsServicetoken - Crowd SSO token string.
org.springframework.dao.DataAccessException - thrown if there was an underlying problem while communicating with the Crowd server.
CrowdSSOTokenInvalidException
protected org.springframework.security.GrantedAuthority[] getAuthorities(java.lang.String username)
throws InvalidAuthorizationTokenException,
java.rmi.RemoteException,
UserNotFoundException,
InvalidAuthenticationException
username - username of the user to look up.
InvalidAuthorizationTokenException - invalid application client.
java.rmi.RemoteException - underlying Crowd Server problem.
org.springframework.security.userdetails.UsernameNotFoundException - The user identified by username could not be found.
UserNotFoundException
InvalidAuthenticationExceptionpublic java.lang.String getAuthorityPrefix()
CrowdUserDetailsService
getAuthorityPrefix in interface CrowdUserDetailsServicepublic void setAuthorityPrefix(java.lang.String authorityPrefix)
CrowdUserDetailsService
setAuthorityPrefix in interface CrowdUserDetailsServiceauthorityPrefix - prefix to apply. The default
is no prefix.public java.lang.String getAuthoritySuffix()
CrowdUserDetailsService
getAuthoritySuffix in interface CrowdUserDetailsServicepublic void setAuthoritySuffix(java.lang.String authoritySuffix)
CrowdUserDetailsService
setAuthoritySuffix in interface CrowdUserDetailsServiceauthoritySuffix - suffix to apply.public void setUserManager(UserManager userManager)
public void setGroupMembershipManager(GroupMembershipManager groupMembershipManager)
public void setAuthenticationManager(AuthenticationManager authenticationManager)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||