KEYCLOAK-13026 Set path of OAuth_Token_Request_State cookie to /

This commit is contained in:
Laure-Emmanuelle Issler 2020-02-18 10:57:48 +01:00 committed by Stian Thorgersen
parent a1bbab9eb2
commit 967ff939ec

View file

@ -226,7 +226,7 @@ public class OAuthRequestAuthenticator {
tokenStore.saveRequest(); tokenStore.saveRequest();
log.debug("Sending redirect to login page: " + redirect); log.debug("Sending redirect to login page: " + redirect);
exchange.getResponse().setStatus(302); exchange.getResponse().setStatus(302);
exchange.getResponse().setCookie(deployment.getStateCookieName(), state, /* need to set path? */ null, null, -1, deployment.getSslRequired().isRequired(facade.getRequest().getRemoteAddr()), true); exchange.getResponse().setCookie(deployment.getStateCookieName(), state, "/", null, -1, deployment.getSslRequired().isRequired(facade.getRequest().getRemoteAddr()), true);
exchange.getResponse().setHeader("Location", redirect); exchange.getResponse().setHeader("Location", redirect);
return true; return true;
} }