public class

UserDetailsServiceWrapper

extends Object
implements UserDetailsService
java.lang.Object
   ↳ org.springframework.security.access.hierarchicalroles.UserDetailsServiceWrapper

This class is deprecated.
use a RoleHierarchyVoter or use a RoleHierarchyAuthoritiesMapper to populate the Authentication object with the additional authorities.

Class Overview

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.

Summary

Public Constructors
UserDetailsServiceWrapper()
Public Methods
UserDetailsService getWrappedUserDetailsService()
UserDetails loadUserByUsername(String username)
Locates the user based on the username.
void setRoleHierarchy(RoleHierarchy roleHierarchy)
void setUserDetailsService(UserDetailsService userDetailsService)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.security.core.userdetails.UserDetailsService

Public Constructors

public UserDetailsServiceWrapper ()

Public Methods

public UserDetailsService getWrappedUserDetailsService ()

public UserDetails loadUserByUsername (String username)

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..

Parameters
username the username identifying the user whose data is required.
Returns
  • a fully populated user record (never null)

public void setRoleHierarchy (RoleHierarchy roleHierarchy)

public void setUserDetailsService (UserDetailsService userDetailsService)