Newer Version Available
Cookie(name, value, path, maxAge, isSecure, SameSite)
Signature
public Cookie(String name, String value, String path, Integer maxAge, Boolean isSecure, String SameSite)
Parameters
-
name:
Type: String
The cookie name. It can’t be null.
-
value:
Type: String
The cookie data, such as session ID.
-
path:
Type: String
The path from where you can retrieve the cookie.
-
maxAge:
Type: Integer
A number representing how long a cookie is valid for in seconds. If set to less than zero, a session cookie is issued. If set to zero, the cookie is deleted.
-
isSecure:
Type: Boolean
A value indicating whether the cookie can only be accessed through HTTPS (true) or not (false).
-
SameSite:
Type: String
The SameSite attribute on a cookie controls its cross-domain behavior. The valid values are None, Lax, and Strict. After the Chrome 80 release, a cookie with a SameSite value of None must also be marked secure by setting a value of None; Secure.