KEYCLOAK-4342 PR comments
This commit is contained in:
parent
0c6b20e862
commit
e6b9364c39
1 changed files with 6 additions and 5 deletions
|
@ -104,15 +104,16 @@ public class CookieTokenStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getCookiePath(KeycloakDeployment deployment, HttpFacade facade) {
|
static String getCookiePath(KeycloakDeployment deployment, HttpFacade facade) {
|
||||||
if (deployment.getAdapterStateCookiePath().startsWith("/")) {
|
String path = deployment.getAdapterStateCookiePath() == null ? "" : deployment.getAdapterStateCookiePath().trim();
|
||||||
return deployment.getAdapterStateCookiePath();
|
if (path.startsWith("/")) {
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
String contextPath = getContextPath(facade);
|
String contextPath = getContextPath(facade);
|
||||||
StringBuilder cookiePath = new StringBuilder(contextPath);
|
StringBuilder cookiePath = new StringBuilder(contextPath);
|
||||||
if (!contextPath.endsWith("/") && !deployment.getAdapterStateCookiePath().isEmpty()) {
|
if (!contextPath.endsWith("/") && !path.isEmpty()) {
|
||||||
cookiePath.append("/");
|
cookiePath.append("/");
|
||||||
}
|
}
|
||||||
return cookiePath.append(deployment.getAdapterStateCookiePath()).toString();
|
return cookiePath.append(path).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
static String getContextPath(HttpFacade facade) {
|
static String getContextPath(HttpFacade facade) {
|
||||||
|
|
Loading…
Reference in a new issue