davsclaus commented on code in PR #17759: URL: https://github.com/apache/camel/pull/17759#discussion_r2044244520
########## components/camel-oauth/src/main/java/org/apache/camel/oauth/InMemorySessionStore.java: ########## @@ -93,4 +96,15 @@ private Map<String, String> getCookies(Exchange exchange) { return cookieMap; } + + private void setSessionCookie(Message msg, OAuthSession session) { + var sessionId = session.getSessionId(); + var cookieId = "%s=%s".formatted(CAMEL_OAUTH_COOKIE, sessionId); + if (msg.getHeader("Set-Cookie") != null) { + throw new IllegalStateException("Duplicate 'Set-Cookie' header"); + } + var cookie = cookieId + "; Path=/; HttpOnly; SameSite=None; Secure"; + msg.setHeader("Set-Cookie", cookie); + log.info("Set-Cookie: {}", cookie); Review Comment: The INFO logging may need to be toned down to DEBUG as for production usage you may not want to log all interactions -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org