|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.integration.acegi.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.acegisecurity.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.acegisecurity.userdetails.UsernameNotFoundException, org.springframework.dao.DataAccessException
CrowdUserDetailsService
loadUserByUsername
in interface CrowdUserDetailsService
loadUserByUsername
in interface org.acegisecurity.userdetails.UserDetailsService
username
- username of the principal.
org.acegisecurity.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 CrowdUserDetailsService
token
- Crowd SSO token string.
CrowdSSOTokenInvalidException
- if the provided token is invalid.
org.springframework.dao.DataAccessException
- thrown if there was an underlying problem while communicating with the Crowd server.protected org.acegisecurity.GrantedAuthority[] getAuthorities(java.lang.String username) throws InvalidAuthorizationTokenException, java.rmi.RemoteException
username
- username of the user to look up.
InvalidAuthorizationTokenException
- invalid application client.
java.rmi.RemoteException
- underlying Crowd Server problem.
org.acegisecurity.userdetails.UsernameNotFoundException
- The user identified by username
could not be found.public java.lang.String getAuthorityPrefix()
CrowdUserDetailsService
getAuthorityPrefix
in interface CrowdUserDetailsService
public void setAuthorityPrefix(java.lang.String authorityPrefix)
CrowdUserDetailsService
setAuthorityPrefix
in interface CrowdUserDetailsService
authorityPrefix
- prefix to apply. The default
is no prefix.public java.lang.String getAuthoritySuffix()
CrowdUserDetailsService
getAuthoritySuffix
in interface CrowdUserDetailsService
public void setAuthoritySuffix(java.lang.String authoritySuffix)
CrowdUserDetailsService
setAuthoritySuffix
in interface CrowdUserDetailsService
authoritySuffix
- 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 |