public class DelegateUserDetailsServiceSwitchUserDetailsService extends Object implements SwitchUserDetailsService
Modifier and Type | Field and Description |
---|---|
protected UserDetailsService |
delegate |
Constructor and Description |
---|
DelegateUserDetailsServiceSwitchUserDetailsService(UserDetailsService delegate) |
Modifier and Type | Method and Description |
---|---|
UserDetails |
loadUserByUsername(Authentication currentAuthentication,
String username)
Locates the user based on the username.
|
protected final UserDetailsService delegate
public DelegateUserDetailsServiceSwitchUserDetailsService(UserDetailsService delegate)
public UserDetails loadUserByUsername(Authentication currentAuthentication, String username) throws UsernameNotFoundException
SwitchUserDetailsService
loadUserByUsername
in interface SwitchUserDetailsService
currentAuthentication
- the authentication of the user performing the impersonationusername
- the username that should be impersonatednull
)UsernameNotFoundException
- if ther could not be found