Class LogoutProcessor

java.lang.Object
org.craftercms.security.processors.impl.LogoutProcessor
All Implemented Interfaces:
RequestSecurityProcessor

public class LogoutProcessor extends Object implements RequestSecurityProcessor
Processes logout requests.
Author:
Alfonso Vásquez
  • Field Details

  • Constructor Details

    • LogoutProcessor

      public LogoutProcessor()
      Default constructor.
  • Method Details

    • setLogoutUrl

      public void setLogoutUrl(String logoutUrl)
    • setLogoutMethod

      public void setLogoutMethod(String logoutMethod)
    • setAuthenticationManager

      public void setAuthenticationManager(AuthenticationManager authenticationManager)
    • setLogoutSuccessHandler

      public void setLogoutSuccessHandler(LogoutSuccessHandler logoutSuccessHandler)
    • setRememberMeManager

      public void setRememberMeManager(RememberMeManager rememberMeManager)
    • processRequest

      public void processRequest(org.craftercms.commons.http.RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception
      Checks if the request URL matches the logoutUrl and the HTTP method matches the logoutMethod. If it does, it proceeds to logout the user, by invalidating the authentication through AuthenticationManager.invalidateAuthentication(Authentication)
      Specified by:
      processRequest in interface RequestSecurityProcessor
      Parameters:
      context - the context which holds the current request and response
      processorChain - the processor chain, used to call the next processor
      Throws:
      Exception
    • isLogoutRequest

      protected boolean isLogoutRequest(javax.servlet.http.HttpServletRequest request)
    • onLogoutSuccess

      protected void onLogoutSuccess(org.craftercms.commons.http.RequestContext context, Authentication authentication) throws IOException
      Throws:
      IOException