Interface SwitchUserDetailsService
-
- All Known Implementing Classes:
DelegateUserDetailsServiceSwitchUserDetailsService
public interface SwitchUserDetailsServiceSimilar toUserDetailsServicewith the difference that this passes the current authentication of the user performing the impersonation.- Author:
- Filip Hrisafov
- See Also:
UserDetailsService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserDetailsloadUserByUsername(Authentication currentAuthentication, String username)Locates the user based on the username.
-
-
-
Method Detail
-
loadUserByUsername
UserDetails loadUserByUsername(Authentication currentAuthentication, String username) throws UsernameNotFoundException
Locates the user based on the username.- Parameters:
currentAuthentication- the authentication of the user performing the impersonationusername- the username that should be impersonated- Returns:
- a fully populated user record (never
null) - Throws:
UsernameNotFoundException- if ther could not be found
-
-