Class CustomLoginSuccessHandler

  • All Implemented Interfaces:
    org.springframework.security.web.authentication.AuthenticationSuccessHandler

    @Service("customLoginSuccessHandler")
    public class CustomLoginSuccessHandler
    extends org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String URL_BEFORE_ATTR  
      • Fields inherited from class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onAuthenticationSuccess​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.Authentication authentication)
      This method will redirect to the page that was called.
      • Methods inherited from class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler

        setRequestCache
      • Methods inherited from class org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler

        clearAuthenticationAttributes
      • Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationTargetUrlRequestHandler

        determineTargetUrl, determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseReferer
      • Methods inherited from interface org.springframework.security.web.authentication.AuthenticationSuccessHandler

        onAuthenticationSuccess
    • Constructor Detail

      • CustomLoginSuccessHandler

        public CustomLoginSuccessHandler()
    • Method Detail

      • onAuthenticationSuccess

        public void onAuthenticationSuccess​(javax.servlet.http.HttpServletRequest request,
                                            javax.servlet.http.HttpServletResponse response,
                                            org.springframework.security.core.Authentication authentication)
                                     throws javax.servlet.ServletException,
                                            IOException
        This method will redirect to the page that was called.
        Specified by:
        onAuthenticationSuccess in interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
        Overrides:
        onAuthenticationSuccess in class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
        Throws:
        javax.servlet.ServletException
        IOException