Class FlowableSwitchUserHandler

java.lang.Object
com.flowable.core.spring.security.switchuser.FlowableSwitchUserHandler
All Implemented Interfaces:
InitializingBean, AuthenticationFailureHandler, AuthenticationSuccessHandler, LogoutHandler, SwitchUserAuthorityChanger

Author:
Filip Hrisafov
  • Field Details

  • Constructor Details

    • FlowableSwitchUserHandler

      public FlowableSwitchUserHandler()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface InitializingBean
    • onAuthenticationFailure

      public void onAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException exception)
      Specified by:
      onAuthenticationFailure in interface AuthenticationFailureHandler
    • onAuthenticationSuccess

      public void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication)
      Specified by:
      onAuthenticationSuccess in interface AuthenticationSuccessHandler
    • getOriginalAuthentication

      protected Authentication getOriginalAuthentication(Authentication authentication)
    • logout

      public void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication)
      Specified by:
      logout in interface LogoutHandler
    • buildRunAs

      public Authentication buildRunAs(Authentication authentication, jakarta.servlet.http.HttpServletRequest httpRequest)
    • modifyGrantedAuthorities

      public Collection<? extends GrantedAuthority> modifyGrantedAuthorities(UserDetails targetUser, Authentication currentAuthentication, Collection<? extends GrantedAuthority> authoritiesToBeGranted)
      Specified by:
      modifyGrantedAuthorities in interface SwitchUserAuthorityChanger
    • isAllowedToImpersonateUser

      protected boolean isAllowedToImpersonateUser(Authentication authentication, UserDetails targetUser)
    • cancelCookie

      protected void cancelCookie(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • setCookie

      protected void setCookie(String cookieValue, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • setCookie

      protected void setCookie(String cookieValue, int maxAge, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    • getCookiePath

      protected String getCookiePath(jakarta.servlet.http.HttpServletRequest request)
    • setKey

      public void setKey(String key)
    • setCookieName

      public void setCookieName(String cookieName)
    • setCookieMaxAge

      public void setCookieMaxAge(Duration duration)
    • setCookieDomain

      public void setCookieDomain(String cookieDomain)
    • setUserDetailsService

      public void setUserDetailsService(UserDetailsService userDetailsService)
    • setImpersonatePermissionVoters

      public void setImpersonatePermissionVoters(Collection<ImpersonatePermissionVoter> impersonatePermissionVoters)