Package org.actioncontroller.values
Annotation Type UnencryptedCookiePreview
-
@Retention(RUNTIME) @Target(PARAMETER) public @interface UnencryptedCookiePreview
This is a preview version of @UnencryptedCookie, which supports cookies with the Same-Site attribute setMaps the parameter to the specified HTTP request cookie, URL decoding and converting the type if necessary. If the session parameter is missing, aborts the request with 401 Unauthorized, unless the parameter type is Optional. If the parameter type is Consumer, calling parameter.accept() sets the cookie value instead of returning it converting the type and URL encoding.
- See Also:
HttpParameterMapping
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringcommentIf set, sets the Comment attribute on the cookiebooleanisHttpOnlyIf false, omits the HttpOnly flag on the cookie, meaning that the cookie can be read by client-side JavaScript.UnencryptedCookiePreview.SameSitesameSiteIf set, sets the SameSite attribute on the cookie.booleansecureIf false, omits the Secure flag on the cookie, meaning that the cookie will be sent over HTTP as well as HTTPS.
-
-
-
Element Detail
-
value
String value
The name of the cookie
-
-
-
sameSite
UnencryptedCookiePreview.SameSite sameSite
If set, sets the SameSite attribute on the cookie. Legal values are: Strict (never send the cookie to other hosts), Lax (send the cookie to other sites with the same domain, even if the subdomain and port differ), None (send the cookie to all sites)- Default:
- org.actioncontroller.values.UnencryptedCookiePreview.SameSite.NotSet
-
-
-
comment
String comment
If set, sets the Comment attribute on the cookie- Default:
- ""
-
-