Package rife.engine
Enum Class SameSite
- All Implemented Interfaces:
Serializable,Comparable<SameSite>,Constable
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 ConstantsEnum ConstantDescriptionThe 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
-
Enum Constant Details
-
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
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
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
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
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 nameNullPointerException- if the argument is null
-
attributeValue
Retrieves the value of theSameSitecookie attribute.This method will return the textual form of this policy, which is what ends up in the
SameSiteattribute of the cookie.- Returns:
- the cookie attribute value of this policy
- Since:
- 1.10
- See Also:
-