Class LoginSuccessHandlerImpl

java.lang.Object
org.craftercms.security.authentication.impl.LoginSuccessHandlerImpl
All Implemented Interfaces:
LoginSuccessHandler

public class LoginSuccessHandlerImpl extends Object implements LoginSuccessHandler
Default implementation of LoginSuccessHandler:
  1. Deletes any authentication exception saved in the session.
  2. Adds the ticket ID and profile last modified cookies to response.
  3. Uses the Spring RequestCache to obtain the previous request before login and redirect to it.
Author:
Alfonso Vásquez
  • Field Details

    • requestCache

      protected org.springframework.security.web.savedrequest.RequestCache requestCache
    • defaultTargetUrl

      protected String defaultTargetUrl
    • alwaysUseDefaultTargetUrl

      protected boolean alwaysUseDefaultTargetUrl
  • Constructor Details

    • LoginSuccessHandlerImpl

      public LoginSuccessHandlerImpl()
  • Method Details

    • setRequestCache

      public void setRequestCache(org.springframework.security.web.savedrequest.RequestCache requestCache)
    • setDefaultTargetUrl

      public void setDefaultTargetUrl(String defaultTargetUrl)
    • getDefaultTargetUrl

      protected String getDefaultTargetUrl()
    • setAlwaysUseDefaultTargetUrl

      public void setAlwaysUseDefaultTargetUrl(boolean alwaysUseDefaultTargetUrl)
    • isAlwaysUseDefaultTargetUrl

      protected boolean isAlwaysUseDefaultTargetUrl()
    • handle

      public void handle(org.craftercms.commons.http.RequestContext context, Authentication authentication) throws SecurityProviderException, IOException
      Description copied from interface: LoginSuccessHandler
      Handles the request after a successful authentication.
      Specified by:
      handle in interface LoginSuccessHandler
      Parameters:
      context - the request context
      authentication - the authentication object
      Throws:
      SecurityProviderException
      IOException
    • redirectToSavedRequest

      protected void redirectToSavedRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
      Throws:
      IOException