public interface SwitchUserDetailsService
UserDetailsService
with the difference that this passes the current authentication of the user performing the impersonation.UserDetailsService
Modifier and Type | Method and Description |
---|---|
UserDetails |
loadUserByUsername(Authentication currentAuthentication,
String username)
Locates the user based on the username.
|
UserDetails loadUserByUsername(Authentication currentAuthentication, String username) throws UsernameNotFoundException
currentAuthentication
- the authentication of the user performing the impersonationusername
- the username that should be impersonatednull
)UsernameNotFoundException
- if ther could not be found