Enum Class HttpCookie.SameSite

java.lang.Object
java.lang.Enum<HttpCookie.SameSite>
org.eclipse.jetty.http.HttpCookie.SameSite
All Implemented Interfaces:
Serializable, Comparable<HttpCookie.SameSite>, Constable
Enclosing interface:
HttpCookie

public static enum HttpCookie.SameSite extends Enum<HttpCookie.SameSite>

The possible values for the SameSite attribute, defined in the follow-up of RFC 6265, at the time of this writing defined at RFC 6265bis.

  • Enum Constant Details

    • NONE

      public static final HttpCookie.SameSite NONE
      The value None for the SameSite attribute
    • STRICT

      public static final HttpCookie.SameSite STRICT
      The value Strict for the SameSite attribute
    • LAX

      public static final HttpCookie.SameSite LAX
      The value Lax for the SameSite attribute
  • Method Details

    • values

      public static HttpCookie.SameSite[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HttpCookie.SameSite valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getAttributeValue

      public String getAttributeValue()
      Returns:
      the SameSite attribute value
    • from

      public static HttpCookie.SameSite from(String sameSite)
      Parameters:
      sameSite - the SameSite attribute value
      Returns:
      the enum constant associated with the SameSite attribute value, or null if the value is not a known SameSite attribute value