org.springframework.security.access.hierarchicalroles
Class UserDetailsServiceWrapper

java.lang.Object
  extended by org.springframework.security.access.hierarchicalroles.UserDetailsServiceWrapper
All Implemented Interfaces:
UserDetailsService

Deprecated. use a RoleHierarchyVoter instead of populating the user Authentication object with the additional authorities.

public class UserDetailsServiceWrapper
extends Object
implements UserDetailsService

This class wraps Spring Security's UserDetailsService in a way that its loadUserByUsername() method returns wrapped UserDetails that return all hierarchically 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

UserDetailsServiceWrapper

public UserDetailsServiceWrapper()
Deprecated. 
Method Detail

setRoleHierarchy

public void setRoleHierarchy(RoleHierarchy roleHierarchy)
Deprecated. 

setUserDetailsService

public void setUserDetailsService(UserDetailsService userDetailsService)
Deprecated. 

loadUserByUsername

public UserDetails loadUserByUsername(String username)
                               throws UsernameNotFoundException,
                                      DataAccessException
Deprecated. 
Description copied from interface: UserDetailsService
Locates the user based on the username. In the actual implementation, the search may possibly be case insensitive, or case insensitive depending on how the implementation instance is configured. In this case, the UserDetails object that comes back may have a username that is of a different case than what was actually requested..

Specified by:
loadUserByUsername in interface UserDetailsService
Parameters:
username - the username identifying the user whose data is required.
Returns:
a fully populated user record (never null)
Throws:
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 reason

getWrappedUserDetailsService

public UserDetailsService getWrappedUserDetailsService()
Deprecated.