Class SavedRequestAwareProcessor
java.lang.Object
org.craftercms.security.processors.impl.SavedRequestAwareProcessor
- All Implemented Interfaces:
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 Summary
Modifier and TypeFieldDescriptionstatic final org.slf4j.Logger
protected org.springframework.security.web.savedrequest.RequestCache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
processRequest
(org.craftercms.commons.http.RequestContext context, RequestSecurityProcessorChain processorChain) Checks if there's a request in the request cache (which means that a previous request was cached).void
setRequestCache
(org.springframework.security.web.savedrequest.RequestCache requestCache)
-
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 interfaceRequestSecurityProcessor
- Parameters:
context
- the context which holds the current request and responseprocessorChain
- the processor chain, used to call the next processor- Throws:
Exception
-