Constructor and Description |
---|
Cookie(String name,
String value)
Deprecated.
Please use
CookieBuilder.newCookie() instead |
Modifier and Type | Method and Description |
---|---|
static CookieBuilder |
builder()
Creates a new cookie builder with secure, Strict SameSite and httpOnly selected.
|
String |
domain() |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
long |
maxAge() |
String |
name() |
String |
path() |
String |
sameSite() |
static Cookie |
secureCookie(String name,
String value)
Deprecated.
Please use
CookieBuilder.newSecureCookie() instead |
void |
setDomain(String domain)
Deprecated.
Please create cookies with the
CookieBuilder |
void |
setHttpOnly(boolean httpOnly)
Deprecated.
Please create cookies with the
CookieBuilder |
void |
setMaxAge(long maxAgeInSeconds)
Deprecated.
Please create cookies with the
CookieBuilder |
void |
setPath(String path)
Deprecated.
Please create cookies with the
CookieBuilder |
void |
setSecure(boolean secure)
Deprecated.
Please create cookies with the
CookieBuilder |
void |
setValue(String value)
Deprecated.
Please create cookies with the
CookieBuilder |
String |
toString() |
String |
value() |
@Deprecated public Cookie(String name, String value)
CookieBuilder.newCookie()
insteadCreates a new cookie with secure settings such as HttpOnly and Secure set to true.
name
- The name of the cookievalue
- The value of the cookie@Deprecated public static Cookie secureCookie(String name, String value)
CookieBuilder.newSecureCookie()
insteadCreates a new cookie with secure settings such as HttpOnly and Secure set to true.
name
- The name of the cookievalue
- The value of the cookiepublic String name()
public String value()
@Deprecated public void setValue(String value)
CookieBuilder
value
- The value to set.public String domain()
@Deprecated public void setDomain(String domain)
CookieBuilder
domain
- domainpublic String path()
@Deprecated public void setPath(String path)
CookieBuilder
path
- pathpublic long maxAge()
public String sameSite()
@Deprecated public void setMaxAge(long maxAgeInSeconds)
CookieBuilder
maxAgeInSeconds
- maxpublic boolean isSecure()
@Deprecated public void setSecure(boolean secure)
CookieBuilder
secure
- securepublic boolean isHttpOnly()
@Deprecated public void setHttpOnly(boolean httpOnly)
CookieBuilder
httpOnly
- httpOnlypublic static CookieBuilder builder()
Copyright © 2017–2021. All rights reserved.