Class CustomLogoutSuccessHandler

  • All Implemented Interfaces:
    org.springframework.security.web.authentication.logout.LogoutSuccessHandler

    @Service("customLogoutSuccessHandler")
    public class CustomLogoutSuccessHandler
    extends org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
    This class extends and implements spring-security classes to intercept and handle the logout process in order to execute custom actions, for example, to evict cache of logged out user and to control the template to see after a successful logout
    • Field Summary

      • Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onLogoutSuccess​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)  
      • Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler

        determineTargetUrl, determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
    • Constructor Detail

      • CustomLogoutSuccessHandler

        public CustomLogoutSuccessHandler()
    • Method Detail

      • onLogoutSuccess

        public void onLogoutSuccess​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    org.springframework.security.core.Authentication authentication)
                             throws IOException
        Specified by:
        onLogoutSuccess in interface org.springframework.security.web.authentication.logout.LogoutSuccessHandler
        Overrides:
        onLogoutSuccess in class org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
        Throws:
        IOException