Package io.micronaut.http.cookie
Enum Class SameSite
- All Implemented Interfaces:
Serializable
,Comparable<SameSite>
,Constable
Asserts that a cookie must not be sent with cross-origin requests, providing some protection against cross-site request forgery attacks (CSRF).
Possible values for the SameSite attribute.
See changes to RFC6265bis
- Since:
- 1.3.4
- Author:
- croudet
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe cookie will be sent along with the GET request initiated by third party website.Allows third-party cookies to track users across sites.When the SameSite attribute is set as Strict, the cookie will not be sent along with requests initiated by third party websites. -
Method Summary
-
Enum Constant Details
-
Lax
The cookie will be sent along with the GET request initiated by third party website. -
Strict
When the SameSite attribute is set as Strict, the cookie will not be sent along with requests initiated by third party websites. -
None
Allows third-party cookies to track users across sites. The None directive requires the Secure attribute.
-
-
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
-