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
Modifier and TypeFieldDescriptionprotected String
protected Duration
protected String
protected String
protected Collection<ImpersonatePermissionVoter>
protected String
protected FlowableSwitchUserHandler
protected String
protected UserDetailsService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cookieDomain
(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 UserDetailsService
getUserDetailsService
(ApplicationContext applicationContext) impersonatePermissionVoter
(ImpersonatePermissionVoter impersonatePermissionVoter) Add anImpersonatePermissionVoter
.void
The 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, withObjectPostProcessor
Methods 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
SwitchUserConfigurer
for further customization
-
cookieName
The name of the run as user cookie.- Parameters:
cookieName
- the name of the cookie- Returns:
- the
SwitchUserConfigurer
for further customization
-
cookieMaxAge
The max age for the run as user cookie.- Parameters:
cookieMaxAge
- the max age of the cookie- Returns:
- the
SwitchUserConfigurer
for further customization
-
cookieDomain
The domain of the run as user cookie.- Parameters:
cookieDomain
- the domain of the cookie- Returns:
- the
SwitchUserConfigurer
for further customization
-
switchUserUrl
The URL to respond to switch the user processing.- Parameters:
switchUserUrl
- the switch user URL- Returns:
- the
SwitchUserConfigurer
for further customization
-
exitUserUrl
The URL to respond to exit the user switching.- Parameters:
exitUserUrl
- the switch user URL- Returns:
- the
SwitchUserConfigurer
for 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
SwitchUserConfigurer
for further customization
-
init
- Specified by:
init
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Overrides:
init
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>>
-
configure
- Specified by:
configure
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Overrides:
configure
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Throws:
Exception
-
getUserDetailsService
-