Package org.keycloak.common.util
Class ServerCookie
java.lang.Object
org.keycloak.common.util.ServerCookie
- All Implemented Interfaces:
Serializable
Server-side cookie representation. borrowed from Tomcat.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanalreadyQuoted(String value) static voidappendCookieValue(StringBuilder headerBuf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure, boolean httpOnly, ServerCookie.SameSiteAttributeValue sameSite) static booleanDeprecated.- Not usedstatic booleancontainsCTL(String value, int version) static Stringstatic voidformatOldCookie(Date d, StringBuffer sb, FieldPosition fp) static StringgetCookieHeaderName(int version) Return the header name to set the cookie, based on cookie version.static booleanstatic booleanstatic voidmaybeQuote(int version, StringBuffer buf, String value) Deprecated.- Not usedstatic voidmaybeQuote2(int version, StringBuffer buf, String value) Quotes values using rules that vary depending on Cookie version.
-
Field Details
-
GMT_ZONE
GMT timezone - all HTTP dates are on GMT
-
-
Constructor Details
-
ServerCookie
public ServerCookie()
-
-
Method Details
-
isToken
-
containsCTL
-
isToken2
-
checkName
Deprecated.- Not used -
getCookieHeaderName
Return the header name to set the cookie, based on cookie version. -
formatOldCookie
-
formatOldCookie
-
appendCookieValue
public static void appendCookieValue(StringBuilder headerBuf, int version, String name, String value, String path, String domain, String comment, int maxAge, boolean isSecure, boolean httpOnly, ServerCookie.SameSiteAttributeValue sameSite) -
maybeQuote
Deprecated.- Not used -
alreadyQuoted
-
maybeQuote2
Quotes values using rules that vary depending on Cookie version.- Parameters:
version-buf-value-
-