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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
AddSecurityCookiesProcessor.AddSecurityCookiesResponseWrapper
-
Field Summary
Fields Modifier and Type Field Description protected org.craftercms.commons.http.CookieManager
profileLastModifiedCookieManager
protected org.craftercms.commons.http.CookieManager
ticketCookieManager
-
Constructor Summary
Constructors Constructor Description AddSecurityCookiesProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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)
protected AddSecurityCookiesProcessor.AddSecurityCookiesResponseWrapper
wrapResponse(org.craftercms.commons.http.RequestContext context)
-
-
-
Method Detail
-
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)
-
-