Package rife.engine

Enum Class SameSite

All Implemented Interfaces:
Serializable, Comparable<SameSite>, Constable

public enum SameSite extends Enum<SameSite>
The SameSite policies of a cookie, which determine whether a browser will send the cookie along with the requests that originate from another site.
Since:
1.10
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The cookie is sent with same-site requests and when a regular link from another site is followed, while it isn't sent with cross-site form submissions or with other unsafe cross-site requests.
    The cookie is sent with every request, including the cross-site ones, which browsers will only accept when the cookie is secure as well.
    The cookie is only sent with same-site requests, so that it's never sent when another site links to yours or submits to it.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the value of the SameSite cookie attribute.
    static SameSite
    Returns the enum constant of this class with the specified name.
    static SameSite[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • STRICT

      public static final SameSite STRICT
      The cookie is only sent with same-site requests, so that it's never sent when another site links to yours or submits to it.
      Since:
      1.10
    • LAX

      public static final SameSite LAX
      The cookie is sent with same-site requests and when a regular link from another site is followed, while it isn't sent with cross-site form submissions or with other unsafe cross-site requests.
      Since:
      1.10
    • NONE

      public static final SameSite NONE
      The cookie is sent with every request, including the cross-site ones, which browsers will only accept when the cookie is secure as well.
      Since:
      1.10
  • Method Details

    • values

      public static 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 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
    • attributeValue

      public String attributeValue()
      Retrieves the value of the SameSite cookie attribute.

      This method will return the textual form of this policy, which is what ends up in the SameSite attribute of the cookie.

      Returns:
      the cookie attribute value of this policy
      Since:
      1.10
      See Also: