Class DelegateUserDetailsServiceSwitchUserDetailsService
- java.lang.Object
-
- com.flowable.core.spring.security.switchuser.DelegateUserDetailsServiceSwitchUserDetailsService
-
- All Implemented Interfaces:
SwitchUserDetailsService
public class DelegateUserDetailsServiceSwitchUserDetailsService extends Object implements SwitchUserDetailsService
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected UserDetailsService
delegate
-
Constructor Summary
Constructors Constructor Description DelegateUserDetailsServiceSwitchUserDetailsService(UserDetailsService delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UserDetails
loadUserByUsername(Authentication currentAuthentication, String username)
Locates the user based on the username.
-
-
-
Field Detail
-
delegate
protected final UserDetailsService delegate
-
-
Constructor Detail
-
DelegateUserDetailsServiceSwitchUserDetailsService
public DelegateUserDetailsServiceSwitchUserDetailsService(UserDetailsService delegate)
-
-
Method Detail
-
loadUserByUsername
public UserDetails loadUserByUsername(Authentication currentAuthentication, String username) throws UsernameNotFoundException
Description copied from interface:SwitchUserDetailsService
Locates the user based on the username.- Specified by:
loadUserByUsername
in interfaceSwitchUserDetailsService
- 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
-
-