Module io.inverno.mod.http.base
Package io.inverno.mod.http.base.header
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
Defines a same site policy as defined by SameSite cookie.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the same-site policy corresponding to the specified value.getValue()
Returns the policy value.Returns the enum constant of this class with the specified name.static Headers.SetCookie.SameSitePolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LAX
Send the cookie when navigating to the origin site from an external site. -
STRICT
Only send cookie for same-site requests. -
NONE
Send the cookie with both same-site and cross-site requests. The secure attribute must be set totrue
.
-
-
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
-
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
-