Class DefaultGUIDCookieStrategy
- java.lang.Object
-
- de.hybris.platform.yacceleratorstorefront.security.impl.DefaultGUIDCookieStrategy
-
- All Implemented Interfaces:
GUIDCookieStrategy
public class DefaultGUIDCookieStrategy extends java.lang.Object implements GUIDCookieStrategy
Default implementation ofGUIDCookieStrategy
-
-
Constructor Summary
Constructors Constructor Description DefaultGUIDCookieStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
createGUID()
void
deleteCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Removes the GUID cookieprotected org.springframework.web.util.CookieGenerator
getCookieGenerator()
protected java.security.SecureRandom
getRandom()
protected java.security.MessageDigest
getSha()
void
setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Generates a UID and stores it as Cookie and session attributevoid
setCookieGenerator(org.springframework.web.util.CookieGenerator cookieGenerator)
-
-
-
Method Detail
-
setCookie
public void setCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:GUIDCookieStrategy
Generates a UID and stores it as Cookie and session attribute- Specified by:
setCookie
in interfaceGUIDCookieStrategy
-
deleteCookie
public void deleteCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:GUIDCookieStrategy
Removes the GUID cookie- Specified by:
deleteCookie
in interfaceGUIDCookieStrategy
-
createGUID
protected java.lang.String createGUID()
-
getCookieGenerator
protected org.springframework.web.util.CookieGenerator getCookieGenerator()
-
setCookieGenerator
public void setCookieGenerator(org.springframework.web.util.CookieGenerator cookieGenerator)
- Parameters:
cookieGenerator
- the cookieGenerator to set
-
getRandom
protected java.security.SecureRandom getRandom()
-
getSha
protected java.security.MessageDigest getSha()
-
-