Package io.datarouter.auth.util
Class CookieTool
java.lang.Object
io.datarouter.auth.util.CookieTool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddCookie(javax.servlet.http.HttpServletResponse response, String cookieName, String value, String path, int maxAgeSeconds) static voidaddCookie(javax.servlet.http.HttpServletResponse response, String cookieName, String value, String path, long maxAgeSeconds) static voidaddCookie(javax.servlet.http.HttpServletResponse response, String cookieName, String value, String path, long maxAgeSeconds, boolean sameSiteNone) static voidaddCookieSameSiteNone(javax.servlet.http.HttpServletResponse response, String cookieName, String value, String path, long maxAgeSeconds) static voiddeleteCookie(javax.servlet.http.HttpServletResponse response, String cookieName) static StringescapeCookieCharacters(String value) static javax.servlet.http.Cookiestatic BooleangetCookieBoolean(javax.servlet.http.Cookie[] cookies, String cookieName) static BooleangetCookieBooleanDefault(javax.servlet.http.Cookie[] cookies, String cookieName, Boolean defaultValue) static StringgetCookieValue(javax.servlet.http.Cookie[] cookies, String cookieName, String defaultValue) static StringgetCookieValue(javax.servlet.http.HttpServletRequest request, String cookieName) getFormattedCookie(javax.servlet.http.Cookie[] cookies, String cookieName, String regex, String replacement) getMapFromString(String string, String entrySeperator, String keyValueSeparator) Build a map from the string with the format "key[keyValueSeparator]value[entrySeperator]key[keyValueSeparator]value..."static StringunescapeCookieCharacters(String value)
-
Constructor Details
-
CookieTool
public CookieTool()
-
-
Method Details
-
addCookie
-
addCookie
-
addCookie
-
addCookieSameSiteNone
-
getCookieValue
-
getCookieValue
-
getCookieBoolean
-
getCookieBooleanDefault
-
escapeCookieCharacters
-
unescapeCookieCharacters
-
getCookie
public static javax.servlet.http.Cookie getCookie(javax.servlet.http.Cookie[] cookies, String cookieName) -
getFormattedCookie
-
deleteCookie
-
getMapFromString
public static Map<String,String> getMapFromString(String string, String entrySeperator, String keyValueSeparator) Build a map from the string with the format "key[keyValueSeparator]value[entrySeperator]key[keyValueSeparator]value..."
-