SAML2: add cookie with HttpOnly too #10013 (#10047)

This commit is contained in:
Wei Zhou 2024-12-09 16:45:21 +01:00 committed by GitHub
parent 4876761154
commit f9b176744e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -320,6 +320,7 @@ public class SAMLUtils {
String sessionKeyCookie = String.format("%s=%s;Domain=%s;Path=%s;%s", ApiConstants.SESSIONKEY, loginResponse.getSessionKey(), domain, path, sameSite); String sessionKeyCookie = String.format("%s=%s;Domain=%s;Path=%s;%s", ApiConstants.SESSIONKEY, loginResponse.getSessionKey(), domain, path, sameSite);
s_logger.debug("Adding sessionkey cookie to response: " + sessionKeyCookie); s_logger.debug("Adding sessionkey cookie to response: " + sessionKeyCookie);
resp.addHeader("SET-COOKIE", sessionKeyCookie); resp.addHeader("SET-COOKIE", sessionKeyCookie);
resp.addHeader("SET-COOKIE", String.format("%s=%s;HttpOnly;Path=/client/api;%s", ApiConstants.SESSIONKEY, loginResponse.getSessionKey(), sameSite));
} }
/** /**