Class AddSecurityCookiesProcessor
java.lang.Object
org.craftercms.security.processors.impl.AddSecurityCookiesProcessor
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.craftercms.commons.http.CookieManager
protected org.craftercms.commons.http.CookieManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
processRequest
(org.craftercms.commons.http.RequestContext context, RequestSecurityProcessorChain processorChain) Wraps the response in a wrapper that adds (or deletes) the security cookies before the response is sent.void
setProfileLastModifiedCookieManager
(org.craftercms.commons.http.CookieManager profileLastModifiedCookieManager) void
setTicketCookieManager
(org.craftercms.commons.http.CookieManager ticketCookieManager) wrapResponse
(org.craftercms.commons.http.RequestContext context)
-
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 interfaceRequestSecurityProcessor
- Parameters:
context
- the context which holds the current request and responseprocessorChain
- theRequestSecurityProcessorChain
, used to call the next processor- Throws:
Exception
-
wrapResponse
protected AddSecurityCookiesProcessor.AddSecurityCookiesResponseWrapper wrapResponse(org.craftercms.commons.http.RequestContext context)
-