Class SwitchUserConfigurer<H extends HttpSecurityBuilder<H>>
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<DefaultSecurityFilterChain,B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<SwitchUserConfigurer<H>,H>
com.flowable.core.spring.security.switchuser.SwitchUserConfigurer<H>
- All Implemented Interfaces:
SecurityConfigurer<DefaultSecurityFilterChain,H>
public class SwitchUserConfigurer<H extends HttpSecurityBuilder<H>>
extends AbstractHttpConfigurer<SwitchUserConfigurer<H>,H>
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected Durationprotected Stringprotected Stringprotected Collection<ImpersonatePermissionVoter>protected Stringprotected FlowableSwitchUserHandlerprotected Stringprotected UserDetailsService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcookieDomain(String cookieDomain) The domain of the run as user cookie.cookieMaxAge(Duration cookieMaxAge) The max age for the run as user cookie.cookieName(String cookieName) The name of the run as user cookie.exitUserUrl(String exitUserUrl) The URL to respond to exit the user switching.protected UserDetailsServicegetUserDetailsService(ApplicationContext applicationContext) impersonatePermissionVoter(ImpersonatePermissionVoter impersonatePermissionVoter) Add anImpersonatePermissionVoter.voidThe key for the run as user token.switchUserUrl(String switchUserUrl) The URL to respond to switch the user processing.Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, getSecurityContextHolderStrategy, withObjectPostProcessorMethods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, postProcess, setBuilder
-
Field Details
-
key
-
cookieName
-
cookieMaxAge
-
cookieDomain
-
exitUserUrl
-
switchUserUrl
-
switchUserHandler
-
userDetailsService
-
impersonatePermissionVoters
-
-
Constructor Details
-
SwitchUserConfigurer
public SwitchUserConfigurer()
-
-
Method Details
-
key
The key for the run as user token.- Parameters:
key- the key for the token- Returns:
- the
SwitchUserConfigurerfor further customization
-
cookieName
The name of the run as user cookie.- Parameters:
cookieName- the name of the cookie- Returns:
- the
SwitchUserConfigurerfor further customization
-
cookieMaxAge
The max age for the run as user cookie.- Parameters:
cookieMaxAge- the max age of the cookie- Returns:
- the
SwitchUserConfigurerfor further customization
-
cookieDomain
The domain of the run as user cookie.- Parameters:
cookieDomain- the domain of the cookie- Returns:
- the
SwitchUserConfigurerfor further customization
-
switchUserUrl
The URL to respond to switch the user processing.- Parameters:
switchUserUrl- the switch user URL- Returns:
- the
SwitchUserConfigurerfor further customization
-
exitUserUrl
The URL to respond to exit the user switching.- Parameters:
exitUserUrl- the switch user URL- Returns:
- the
SwitchUserConfigurerfor further customization
-
impersonatePermissionVoter
public SwitchUserConfigurer<H> impersonatePermissionVoter(ImpersonatePermissionVoter impersonatePermissionVoter) Add anImpersonatePermissionVoter.- Parameters:
impersonatePermissionVoter- the impersonate permission voter to be added to the configurer.- Returns:
- the
SwitchUserConfigurerfor further customization
-
init
- Specified by:
initin interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Overrides:
initin classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>
-
configure
- Specified by:
configurein interfaceSecurityConfigurer<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Overrides:
configurein classSecurityConfigurerAdapter<DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>> - Throws:
Exception
-
getUserDetailsService
-