Class ServerCookieDecoder


  • public final class ServerCookieDecoder
    extends CookieDecoder
    A RFC6265 compliant cookie decoder to be used server side. Only name and value fields are expected, so old fields are not populated (path, domain, etc). Old RFC2965 cookies are still supported, old fields will simply be ignored.
    See Also:
    ServerCookieEncoder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ServerCookieDecoder LAX
      Lax instance that doesn't validate name and value
      static ServerCookieDecoder STRICT
      Strict decoder that validates that name and value chars are in the valid scope defined in RFC6265
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<Cookie> decode​(java.lang.String header)
      Decodes the specified Cookie HTTP header value into a Cookie.
      java.util.List<Cookie> decodeAll​(java.lang.String header)
      Decodes the specified Cookie HTTP header value into a Cookie.
      • Methods inherited from class java.lang.Object

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

      • STRICT

        public static final ServerCookieDecoder STRICT
        Strict decoder that validates that name and value chars are in the valid scope defined in RFC6265
      • LAX

        public static final ServerCookieDecoder LAX
        Lax instance that doesn't validate name and value
    • Method Detail

      • decodeAll

        public java.util.List<Cookie> decodeAll​(java.lang.String header)
        Decodes the specified Cookie HTTP header value into a Cookie. Unlike decode(String), this includes all cookie values present, even if they have the same name.
        Returns:
        the decoded Cookie
      • decode

        public java.util.Set<Cookie> decode​(java.lang.String header)
        Decodes the specified Cookie HTTP header value into a Cookie.
        Returns:
        the decoded Cookie