Enum Class Headers.SetCookie.SameSitePolicy

java.lang.Object
java.lang.Enum<Headers.SetCookie.SameSitePolicy>
io.inverno.mod.http.base.header.Headers.SetCookie.SameSitePolicy
All Implemented Interfaces:
Serializable, Comparable<Headers.SetCookie.SameSitePolicy>, Constable
Enclosing interface:
Headers.SetCookie

public static enum Headers.SetCookie.SameSitePolicy extends Enum<Headers.SetCookie.SameSitePolicy>

Defines a same site policy as defined by SameSite cookie.

Since:
1.5
Author:
Jeremy Kuhn
  • Enum Constant Details

  • Method Details

    • values

      public static Headers.SetCookie.SameSitePolicy[] 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 Headers.SetCookie.SameSitePolicy 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
    • getValue

      public String getValue()

      Returns the policy value.

      Returns:
      the policy value
    • fromValue

      public static Headers.SetCookie.SameSitePolicy fromValue(String value) throws IllegalArgumentException

      Returns the same-site policy corresponding to the specified value.

      Parameters:
      value - the policy value
      Returns:
      a same-site policy
      Throws:
      IllegalArgumentException - if the specified value does not correspond to a known policy