Class EnhancedCookieGenerator
- java.lang.Object
-
- org.springframework.web.util.CookieGenerator
-
- de.hybris.platform.yacceleratorstorefront.security.cookie.EnhancedCookieGenerator
-
- Direct Known Subclasses:
CartRestoreCookieGenerator,CookieNotificationCookieGenerator,CustomerLocationCookieGenerator
public class EnhancedCookieGenerator extends org.springframework.web.util.CookieGeneratorEnhancedCookieGeneratorsets additionally header attribute "Set-Cookie"
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_COOKIE_PATHstatic booleanDEFAULT_HTTP_ONLYstatic java.lang.StringHEADER_COOKIE
-
Constructor Summary
Constructors Constructor Description EnhancedCookieGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCookie(javax.servlet.http.HttpServletResponse response, java.lang.String cookieValue)protected booleancanUseDefaultPath()protected booleanisHttpOnly()protected voidsetEnhancedCookiePath(javax.servlet.http.Cookie cookie)Sets dynamically theCookie.setPath(String)value using availableHttpServletRequest.getContextPath().voidsetHttpOnly(boolean httpOnly)Marker to choose between only cookie based session and http header as additionvoidsetUseDefaultPath(boolean useDefaultPath)Adjusts either dynamicCookie.setPath(String)or static assignment.
-
-
-
Field Detail
-
HEADER_COOKIE
public static final java.lang.String HEADER_COOKIE
- See Also:
- Constant Field Values
-
DEFAULT_HTTP_ONLY
public static final boolean DEFAULT_HTTP_ONLY
- See Also:
- Constant Field Values
-
DEFAULT_COOKIE_PATH
public static final boolean DEFAULT_COOKIE_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
isHttpOnly
protected boolean isHttpOnly()
-
setHttpOnly
public void setHttpOnly(boolean httpOnly)
Marker to choose between only cookie based session and http header as addition
-
canUseDefaultPath
protected boolean canUseDefaultPath()
-
setUseDefaultPath
public void setUseDefaultPath(boolean useDefaultPath)
Adjusts either dynamicCookie.setPath(String)or static assignment. If true a cookie path is calculated bysetEnhancedCookiePath(Cookie)method.
-
addCookie
public void addCookie(javax.servlet.http.HttpServletResponse response, java.lang.String cookieValue)- Overrides:
addCookiein classorg.springframework.web.util.CookieGenerator
-
setEnhancedCookiePath
protected void setEnhancedCookiePath(javax.servlet.http.Cookie cookie)
Sets dynamically theCookie.setPath(String)value using availableHttpServletRequest.getContextPath().
-
-