public static enum Cookie.SameSite extends Enum<Cookie.SameSite>
Enum Constant and Description |
---|
Lax
The cookie is not sent on cross-site requests, such as calls to load images or frames, but is sent when a
user is navigating to the origin site from an external site (e.g.
|
None
The browser sends the cookie with both cross-site and same-site requests.
|
Strict
The browser sends the cookie only for same-site requests (that is, requests originating from the same site
that set the cookie).
|
Modifier and Type | Method and Description |
---|---|
static Cookie.SameSite |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Cookie.SameSite[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Cookie.SameSite Lax
public static final Cookie.SameSite None
public static final Cookie.SameSite Strict
public static Cookie.SameSite valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Cookie.SameSite[] values()
for (Cookie.SameSite c : Cookie.SameSite.values()) System.out.println(c);