Package org.keycloak.services.util
Class CookieHelper
java.lang.Object
org.keycloak.services.util.CookieHelper
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCookie
(String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly, ServerCookie.SameSiteAttributeValue sameSite, KeycloakSession session) Set a response cookie.static void
addCookie
(String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly, KeycloakSession session) Set a response cookie avoiding SameSite parameterstatic jakarta.ws.rs.core.Cookie
getCookieValue
(KeycloakSession session, String name) parseCookie
(String header, String name)
-
Field Details
-
LEGACY_COOKIE
- See Also:
-
-
Constructor Details
-
CookieHelper
public CookieHelper()
-
-
Method Details
-
addCookie
public static void addCookie(String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly, ServerCookie.SameSiteAttributeValue sameSite, KeycloakSession session) Set a response cookie. This solely exists because JAX-RS 1.1 does not support setting HttpOnly cookies- Parameters:
name
-value
-path
-domain
-comment
-maxAge
-secure
-httpOnly
-sameSite
-
-
addCookie
public static void addCookie(String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly, KeycloakSession session) Set a response cookie avoiding SameSite parameter- Parameters:
name
-value
-path
-domain
-comment
-maxAge
-secure
-httpOnly
-
-
getCookieValue
-
parseCookie
-
getCookie
-