Package org.eclipse.jetty.http
Class HttpCookie
java.lang.Object
org.eclipse.jetty.http.HttpCookie
Deprecated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated.static classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.If this string is found within the comment parsed withisHttpOnlyInComment(String)the check will return truestatic final StringDeprecated.Name of context attribute with default SameSite cookie valuestatic final StringDeprecated.static final StringDeprecated.static final StringDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionHttpCookie(String setCookie) Deprecated.HttpCookie(String name, String value) Deprecated.HttpCookie(String name, String value, long maxAge) Deprecated.HttpCookie(String name, String value, String domain, String path) Deprecated.HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure) Deprecated.HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure, String comment, int version) Deprecated.HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure, String comment, int version, HttpCookie.SameSite sameSite) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionasString()Deprecated.Deprecated.static StringgetCommentWithAttributes(String comment, boolean httpOnly, HttpCookie.SameSite sameSite) Deprecated.static StringgetCommentWithoutAttributes(String comment) Deprecated.Deprecated.longDeprecated.getName()Deprecated.getPath()Deprecated.Deprecated.Deprecated.Deprecated.static HttpCookie.SameSitegetSameSiteDefault(ServletContext context) Deprecated.Get the default value for SameSite cookie attribute, if one has been set for the given context.static HttpCookie.SameSitegetSameSiteFromComment(String comment) Deprecated.getSetCookie(CookieCompliance compliance) Deprecated.getValue()Deprecated.intDeprecated.booleanisExpired(long timeNanos) Deprecated.booleanDeprecated.static booleanisHttpOnlyInComment(String comment) Deprecated.booleanisSecure()Deprecated.
-
Field Details
-
HTTP_ONLY_COMMENT
Deprecated.If this string is found within the comment parsed withisHttpOnlyInComment(String)the check will return true- See Also:
-
SAME_SITE_NONE_COMMENT
Deprecated.- See Also:
-
SAME_SITE_LAX_COMMENT
Deprecated.- See Also:
-
SAME_SITE_STRICT_COMMENT
Deprecated.- See Also:
-
SAME_SITE_DEFAULT_ATTRIBUTE
Deprecated.Name of context attribute with default SameSite cookie value- See Also:
-
-
Constructor Details
-
HttpCookie
Deprecated. -
HttpCookie
Deprecated. -
HttpCookie
Deprecated. -
HttpCookie
public HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure) Deprecated. -
HttpCookie
public HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure, String comment, int version) Deprecated. -
HttpCookie
public HttpCookie(String name, String value, String domain, String path, long maxAge, boolean httpOnly, boolean secure, String comment, int version, HttpCookie.SameSite sameSite) Deprecated. -
HttpCookie
Deprecated.
-
-
Method Details
-
getName
Deprecated.- Returns:
- the cookie name
-
getValue
Deprecated.- Returns:
- the cookie value
-
getComment
Deprecated.- Returns:
- the cookie comment
-
getDomain
Deprecated.- Returns:
- the cookie domain
-
getMaxAge
public long getMaxAge()Deprecated.- Returns:
- the cookie max age in seconds
-
getPath
Deprecated.- Returns:
- the cookie path
-
isSecure
public boolean isSecure()Deprecated.- Returns:
- whether the cookie is valid for secure domains
-
getVersion
public int getVersion()Deprecated.- Returns:
- the cookie version
-
getSameSite
Deprecated.- Returns:
- the cookie SameSite enum attribute
-
isHttpOnly
public boolean isHttpOnly()Deprecated.- Returns:
- whether the cookie is valid for the http protocol only
-
isExpired
public boolean isExpired(long timeNanos) Deprecated.- Parameters:
timeNanos- the time to check for cookie expiration, in nanoseconds- Returns:
- whether the cookie is expired by the given time
-
asString
Deprecated.- Returns:
- a string representation of this cookie
-
getSetCookie
Deprecated. -
getRFC2965SetCookie
Deprecated. -
getRFC6265SetCookie
Deprecated. -
isHttpOnlyInComment
Deprecated. -
getSameSiteFromComment
Deprecated. -
getSameSiteDefault
Deprecated.Get the default value for SameSite cookie attribute, if one has been set for the given context.- Parameters:
context- the context to check for default SameSite value- Returns:
- the default SameSite value or null if one does not exist
- Throws:
IllegalStateException- if the default value is not a permitted value
-
getCommentWithoutAttributes
Deprecated. -
getCommentWithAttributes
public static String getCommentWithAttributes(String comment, boolean httpOnly, HttpCookie.SameSite sameSite) Deprecated.
-