Class CookieHelper

java.lang.Object
org.keycloak.services.util.CookieHelper

public class CookieHelper extends Object
Version:
$Revision: 1 $
Author:
Bill Burke
  • Field Details

  • 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

      public static Set<String> getCookieValue(KeycloakSession session, String name)
    • parseCookie

      public static Set<String> parseCookie(String header, String name)
    • getCookie

      public static jakarta.ws.rs.core.Cookie getCookie(Map<String,jakarta.ws.rs.core.Cookie> cookies, String name)