Class AddSecurityCookiesProcessor

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

public class AddSecurityCookiesProcessor extends Object implements RequestSecurityProcessor
RequestSecurityProcessor implementation that creates a wrapper so that the ticket and profile last update cookies are added to the response, just before it is sent to the client.
Author:
avasquez
  • Field Details

    • ticketCookieManager

      protected org.craftercms.commons.http.CookieManager ticketCookieManager
    • profileLastModifiedCookieManager

      protected org.craftercms.commons.http.CookieManager profileLastModifiedCookieManager
  • Constructor Details

    • AddSecurityCookiesProcessor

      public AddSecurityCookiesProcessor()
  • Method Details

    • setTicketCookieManager

      public void setTicketCookieManager(org.craftercms.commons.http.CookieManager ticketCookieManager)
    • setProfileLastModifiedCookieManager

      public void setProfileLastModifiedCookieManager(org.craftercms.commons.http.CookieManager profileLastModifiedCookieManager)
    • processRequest

      public void processRequest(org.craftercms.commons.http.RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception
      Wraps the response in a wrapper that adds (or deletes) the security cookies before the response is sent.
      Specified by:
      processRequest in interface RequestSecurityProcessor
      Parameters:
      context - the context which holds the current request and response
      processorChain - the RequestSecurityProcessorChain, used to call the next processor
      Throws:
      Exception
    • wrapResponse

      protected AddSecurityCookiesProcessor.AddSecurityCookiesResponseWrapper wrapResponse(org.craftercms.commons.http.RequestContext context)