Class DelegateUserDetailsServiceSwitchUserDetailsService
java.lang.Object
com.flowable.core.spring.security.switchuser.DelegateUserDetailsServiceSwitchUserDetailsService
- All Implemented Interfaces:
SwitchUserDetailsService
public class DelegateUserDetailsServiceSwitchUserDetailsService extends java.lang.Object implements SwitchUserDetailsService
- Author:
- Filip Hrisafov
-
Field Summary
Fields Modifier and Type Field Description protected org.springframework.security.core.userdetails.UserDetailsService
delegate
-
Constructor Summary
Constructors Constructor Description DelegateUserDetailsServiceSwitchUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService delegate)
-
Method Summary
Modifier and Type Method Description org.springframework.security.core.userdetails.UserDetails
loadUserByUsername(org.springframework.security.core.Authentication currentAuthentication, java.lang.String username)
Locates the user based on the username.
-
Field Details
-
delegate
protected final org.springframework.security.core.userdetails.UserDetailsService delegate
-
-
Constructor Details
-
DelegateUserDetailsServiceSwitchUserDetailsService
public DelegateUserDetailsServiceSwitchUserDetailsService(org.springframework.security.core.userdetails.UserDetailsService delegate)
-
-
Method Details
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(org.springframework.security.core.Authentication currentAuthentication, java.lang.String username) throws org.springframework.security.core.userdetails.UsernameNotFoundExceptionDescription 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:
org.springframework.security.core.userdetails.UsernameNotFoundException
- if ther could not be found
-