|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.access.hierarchicalroles.UserDetailsServiceWrapper
RoleHierarchyVoter
instead of populating the user Authentication object
with the additional authorities.
public class UserDetailsServiceWrapper
This class wraps Spring Security's UserDetailsService in a way that its loadUserByUsername() method returns wrapped UserDetails that return all hierachically reachable authorities instead of only the directly assigned authorities.
Constructor Summary | |
---|---|
UserDetailsServiceWrapper()
Deprecated. |
Method Summary | |
---|---|
UserDetailsService |
getWrappedUserDetailsService()
Deprecated. |
UserDetails |
loadUserByUsername(String username)
Deprecated. Locates the user based on the username. |
void |
setRoleHierarchy(RoleHierarchy roleHierarchy)
Deprecated. |
void |
setUserDetailsService(UserDetailsService userDetailsService)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserDetailsServiceWrapper()
Method Detail |
---|
public void setRoleHierarchy(RoleHierarchy roleHierarchy)
public void setUserDetailsService(UserDetailsService userDetailsService)
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException
UserDetailsService
UserDetails
object that comes back may have a username that is of a different case than what was
actually requested..
loadUserByUsername
in interface UserDetailsService
username
- the username presented to the DaoAuthenticationProvider
null
)
UsernameNotFoundException
- if the user could not be found or the user has no GrantedAuthority
DataAccessException
- if user could not be found for a repository-specific reasonpublic UserDetailsService getWrappedUserDetailsService()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |