Package org.keycloak.common.util
Class ServerCookie
- java.lang.Object
- 
- org.keycloak.common.util.ServerCookie
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class ServerCookie extends Object implements Serializable Server-side cookie representation. borrowed from Tomcat.- See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classServerCookie.SameSiteAttributeValue
 - 
Constructor SummaryConstructors Constructor Description ServerCookie()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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 booleancheckName(String name)Deprecated.- Not usedstatic booleancontainsCTL(String value, int version)static StringformatOldCookie(Date d)static voidformatOldCookie(Date d, StringBuffer sb, FieldPosition fp)static StringgetCookieHeaderName(int version)Return the header name to set the cookie, based on cookie version.static booleanisToken(String value)static booleanisToken2(String value)static 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 Detail- 
GMT_ZONEpublic static final TimeZone GMT_ZONE GMT timezone - all HTTP dates are on GMT
 
- 
 - 
Method Detail- 
isTokenpublic static boolean isToken(String value) 
 - 
containsCTLpublic static boolean containsCTL(String value, int version) 
 - 
isToken2public static boolean isToken2(String value) 
 - 
checkNamepublic static boolean checkName(String name) Deprecated.- Not used
 - 
getCookieHeaderNamepublic static String getCookieHeaderName(int version) Return the header name to set the cookie, based on cookie version.
 - 
formatOldCookiepublic static void formatOldCookie(Date d, StringBuffer sb, FieldPosition fp) 
 - 
appendCookieValuepublic 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 public static void maybeQuote(int version, StringBuffer buf, String value) Deprecated.- Not used
 - 
alreadyQuotedpublic static boolean alreadyQuoted(String value) 
 - 
maybeQuote2public static void maybeQuote2(int version, StringBuffer buf, String value)Quotes values using rules that vary depending on Cookie version.- Parameters:
- version-
- buf-
- value-
 
 
- 
 
-