Package org.apache.wicket.util.cookies
Enum CookieDefaults.SameSite
- java.lang.Object
-
- java.lang.Enum<CookieDefaults.SameSite>
-
- org.apache.wicket.util.cookies.CookieDefaults.SameSite
-
- All Implemented Interfaces:
Serializable
,Comparable<CookieDefaults.SameSite>
- Enclosing class:
- CookieDefaults
public static enum CookieDefaults.SameSite extends Enum<CookieDefaults.SameSite>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Lax
Cookies are not sent on normal cross-site subrequests (for example to load images or frames into a third party site), but are sent when a user is navigating to the origin site (i.e., when following a link).None
Cookies will be sent in all contexts, i.e.Strict
Cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CookieDefaults.SameSite
valueOf(String name)
Returns the enum constant of this type with the specified name.static CookieDefaults.SameSite[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
None
public static final CookieDefaults.SameSite None
Cookies will be sent in all contexts, i.e. in responses to both first-party and cross-site requests. If SameSite=None is set, the cookie Secure attribute must also be set (or the cookie will be blocked).
-
Strict
public static final CookieDefaults.SameSite Strict
Cookies will only be sent in a first-party context and not be sent along with requests initiated by third party websites.
-
Lax
public static final CookieDefaults.SameSite Lax
Cookies are not sent on normal cross-site subrequests (for example to load images or frames into a third party site), but are sent when a user is navigating to the origin site (i.e., when following a link).
-
-
Method Detail
-
values
public static CookieDefaults.SameSite[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CookieDefaults.SameSite c : CookieDefaults.SameSite.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CookieDefaults.SameSite valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
-