Class EnhancedCookieGenerator

  • Direct Known Subclasses:
    ConsentReferenceCookieGenerator

    public class EnhancedCookieGenerator
    extends org.springframework.web.util.CookieGenerator
    Enhanced CookieGenerator sets additionally header attribute
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static boolean DEFAULT_COOKIE_PATH  
      static boolean DEFAULT_HTTP_ONLY  
      • Fields inherited from class org.springframework.web.util.CookieGenerator

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addCookie​(javax.servlet.http.HttpServletResponse response, java.lang.String cookieValue)  
      protected boolean canUseDefaultPath()  
      java.lang.String getCookieName()  
      protected boolean isHttpOnly()  
      void setCookieName​(java.lang.String cookieName)  
      protected void setEnhancedCookiePath​(javax.servlet.http.Cookie cookie)
      Sets dynamically the Cookie.setPath(String) value using available HttpServletRequest.getContextPath().
      void setHttpOnly​(boolean httpOnly)
      Marker to choose between only cookie based session and http header as addition
      void setUseDefaultPath​(boolean useDefaultPath)
      Adjusts either dynamic Cookie.setPath(String) or static assignment.
      • Methods inherited from class org.springframework.web.util.CookieGenerator

        createCookie, getCookieDomain, getCookieMaxAge, getCookiePath, isCookieHttpOnly, isCookieSecure, removeCookie, setCookieDomain, setCookieHttpOnly, setCookieMaxAge, setCookiePath, setCookieSecure
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnhancedCookieGenerator

        public EnhancedCookieGenerator()
    • Method Detail

      • setCookieName

        public void setCookieName​(java.lang.String cookieName)
        Overrides:
        setCookieName in class org.springframework.web.util.CookieGenerator
      • 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 dynamic Cookie.setPath(String) or static assignment. If true a cookie path is calculated by setEnhancedCookiePath(Cookie) method.
      • addCookie

        public void addCookie​(javax.servlet.http.HttpServletResponse response,
                              java.lang.String cookieValue)
        Overrides:
        addCookie in class org.springframework.web.util.CookieGenerator
      • setEnhancedCookiePath

        protected void setEnhancedCookiePath​(javax.servlet.http.Cookie cookie)
        Sets dynamically the Cookie.setPath(String) value using available HttpServletRequest.getContextPath().
      • getCookieName

        public java.lang.String getCookieName()
        Overrides:
        getCookieName in class org.springframework.web.util.CookieGenerator