Class SavedRequestAwareProcessor

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

public class SavedRequestAwareProcessor extends Object implements RequestSecurityProcessor
Uses RequestCache to reconstitute a previously saved request (if there's one). This processor is used primarily when a user is redirected to the login page because authentication is required, and the the user is redirected back to the previous page.
Author:
Alfonso Vásquez
  • Field Details

    • logger

      public static final org.slf4j.Logger logger
    • requestCache

      protected org.springframework.security.web.savedrequest.RequestCache requestCache
  • Constructor Details

    • SavedRequestAwareProcessor

      public SavedRequestAwareProcessor()
  • Method Details

    • setRequestCache

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

      public void processRequest(org.craftercms.commons.http.RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception
      Checks if there's a request in the request cache (which means that a previous request was cached). If there's one, the request cache creates a new request by merging the saved request with the current request. The new request is used through the rest of the processor chain.
      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