Class AddSecurityCookiesProcessor
- java.lang.Object
-
- org.craftercms.security.processors.impl.AddSecurityCookiesProcessor
-
- All Implemented Interfaces:
RequestSecurityProcessor
public class AddSecurityCookiesProcessor extends Object implements RequestSecurityProcessor
RequestSecurityProcessorimplementation 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 classAddSecurityCookiesProcessor.AddSecurityCookiesResponseWrapper
-
Field Summary
Fields Modifier and Type Field Description protected org.craftercms.commons.http.CookieManagerprofileLastModifiedCookieManagerprotected org.craftercms.commons.http.CookieManagerticketCookieManager
-
Constructor Summary
Constructors Constructor Description AddSecurityCookiesProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessRequest(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.voidsetProfileLastModifiedCookieManager(org.craftercms.commons.http.CookieManager profileLastModifiedCookieManager)voidsetTicketCookieManager(org.craftercms.commons.http.CookieManager ticketCookieManager)protected AddSecurityCookiesProcessor.AddSecurityCookiesResponseWrapperwrapResponse(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 ExceptionWraps the response in a wrapper that adds (or deletes) the security cookies before the response is sent.- Specified by:
processRequestin 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)
-
-