Class SwitchUserConfigurer<H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>

java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,​B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<SwitchUserConfigurer<H>,​H>
com.flowable.core.spring.security.switchuser.SwitchUserConfigurer<H>
All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,​H>

public class SwitchUserConfigurer<H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
extends org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<SwitchUserConfigurer<H>,​H>
Author:
Filip Hrisafov
  • Field Details

  • Constructor Details

  • Method Details

    • key

      public SwitchUserConfigurer<H> key​(java.lang.String key)
      The key for the run as user token.
      Parameters:
      key - the key for the token
      Returns:
      the SwitchUserConfigurer for further customization
    • cookieName

      public SwitchUserConfigurer<H> cookieName​(java.lang.String cookieName)
      The name of the run as user cookie.
      Parameters:
      cookieName - the name of the cookie
      Returns:
      the SwitchUserConfigurer for further customization
    • cookieMaxAge

      public SwitchUserConfigurer<H> cookieMaxAge​(java.time.Duration 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

      public SwitchUserConfigurer<H> cookieDomain​(java.lang.String cookieDomain)
      The domain of the run as user cookie.
      Parameters:
      cookieDomain - the domain of the cookie
      Returns:
      the SwitchUserConfigurer for further customization
    • switchUserUrl

      public SwitchUserConfigurer<H> switchUserUrl​(java.lang.String switchUserUrl)
      The URL to respond to switch the user processing.
      Parameters:
      switchUserUrl - the switch user URL
      Returns:
      the SwitchUserConfigurer for further customization
    • exitUserUrl

      public SwitchUserConfigurer<H> exitUserUrl​(java.lang.String 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)
      Parameters:
      impersonatePermissionVoter - the impersonate permission voter to be added to the configurer.
      Returns:
      the SwitchUserConfigurer for further customization
    • init

      public void init​(H builder)
      Specified by:
      init in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
      Overrides:
      init in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
    • configure

      public void configure​(H builder) throws java.lang.Exception
      Specified by:
      configure in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
      Overrides:
      configure in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,​H extends org.springframework.security.config.annotation.web.HttpSecurityBuilder<H>>
      Throws:
      java.lang.Exception
    • getUserDetailsService

      protected org.springframework.security.core.userdetails.UserDetailsService getUserDetailsService​(org.springframework.context.ApplicationContext applicationContext)