KEYCLOAK-14109. Added profiles for Spring 2.3 version.
KEYCLOAK-14737. Updated Jetty version to 9.4.29, as required per Spring 2.3.
This commit is contained in:
parent
6206c98a8f
commit
53dfa7c56b
7 changed files with 60 additions and 8 deletions
|
@ -50,8 +50,9 @@ public class KeycloakJettyAuthenticator extends AbstractKeycloakJettyAuthenticat
|
||||||
protected Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
|
protected Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
|
||||||
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
||||||
@Override
|
@Override
|
||||||
public void logout() {
|
public Authentication logout(ServletRequest servletRequest) {
|
||||||
logoutCurrent(request);
|
logoutCurrent((Request) servletRequest);
|
||||||
|
return super.logout(servletRequest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<artifactId>keycloak-saml-jetty94-adapter</artifactId>
|
<artifactId>keycloak-saml-jetty94-adapter</artifactId>
|
||||||
<name>Keycloak Jetty 9.4.x SAML Integration</name>
|
<name>Keycloak Jetty 9.4.x SAML Integration</name>
|
||||||
<properties>
|
<properties>
|
||||||
<jetty9.version>9.4.2.v20170220</jetty9.version>
|
<jetty9.version>${jetty94.version}</jetty9.version>
|
||||||
<keycloak.osgi.export>
|
<keycloak.osgi.export>
|
||||||
org.keycloak.adapters.jetty.*
|
org.keycloak.adapters.jetty.*
|
||||||
</keycloak.osgi.export>
|
</keycloak.osgi.export>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package org.keycloak.adapters.saml.jetty;
|
package org.keycloak.adapters.saml.jetty;
|
||||||
|
|
||||||
|
import org.eclipse.jetty.server.session.Session;
|
||||||
import org.eclipse.jetty.server.session.SessionHandler;
|
import org.eclipse.jetty.server.session.SessionHandler;
|
||||||
import org.keycloak.adapters.jetty.spi.JettySessionManager;
|
import org.keycloak.adapters.jetty.spi.JettySessionManager;
|
||||||
|
|
||||||
|
@ -34,7 +35,15 @@ public class Jetty9SessionManager implements JettySessionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpSession getHttpSession(String id) {
|
public HttpSession getHttpSession(String extendedId) {
|
||||||
return sessionHandler.getHttpSession(id);
|
// inlined code from sessionHandler.getHttpSession(extendedId) since the method visibility changed to protected
|
||||||
|
|
||||||
|
String id = sessionHandler.getSessionIdManager().getId(extendedId);
|
||||||
|
Session session = sessionHandler.getSession(id);
|
||||||
|
|
||||||
|
if (session != null && !session.getExtendedId().equals(extendedId)) {
|
||||||
|
session.setIdChanged(true);
|
||||||
|
}
|
||||||
|
return session;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,9 @@ public class KeycloakSamlAuthenticator extends AbstractSamlAuthenticator {
|
||||||
public Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
|
public Authentication createAuthentication(UserIdentity userIdentity, final Request request) {
|
||||||
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
return new KeycloakAuthentication(getAuthMethod(), userIdentity) {
|
||||||
@Override
|
@Override
|
||||||
public void logout() {
|
public Authentication logout(ServletRequest servletRequest) {
|
||||||
logoutCurrent(request);
|
logoutCurrent((Request) servletRequest);
|
||||||
|
return super.logout(servletRequest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
1
pom.xml
1
pom.xml
|
@ -178,6 +178,7 @@
|
||||||
<spring-boot15.version>1.5.20.RELEASE</spring-boot15.version>
|
<spring-boot15.version>1.5.20.RELEASE</spring-boot15.version>
|
||||||
<spring-boot21.version>2.1.3.RELEASE</spring-boot21.version>
|
<spring-boot21.version>2.1.3.RELEASE</spring-boot21.version>
|
||||||
<spring-boot22.version>2.2.0.RELEASE</spring-boot22.version>
|
<spring-boot22.version>2.2.0.RELEASE</spring-boot22.version>
|
||||||
|
<spring-boot23.version>2.3.0.RELEASE</spring-boot23.version>
|
||||||
|
|
||||||
<!-- webauthn support -->
|
<!-- webauthn support -->
|
||||||
<webauthn4j.version>0.12.0.RELEASE</webauthn4j.version>
|
<webauthn4j.version>0.12.0.RELEASE</webauthn4j.version>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<jetty.version>${jetty94.version}</jetty.version>
|
<jetty.version>${jetty94.version}</jetty.version>
|
||||||
|
|
||||||
<springboot-version>1.5</springboot-version>
|
<springboot-version>2.3</springboot-version>
|
||||||
|
|
||||||
<spring-boot-adapter-jetty>false</spring-boot-adapter-jetty>
|
<spring-boot-adapter-jetty>false</spring-boot-adapter-jetty>
|
||||||
<spring.boot.tomcat.adapter.artifactId>keycloak-tomcat-adapter</spring.boot.tomcat.adapter.artifactId>
|
<spring.boot.tomcat.adapter.artifactId>keycloak-tomcat-adapter</spring.boot.tomcat.adapter.artifactId>
|
||||||
|
@ -438,6 +438,39 @@
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>spring.boot.2.3</id>
|
||||||
|
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>springboot-version</name>
|
||||||
|
<value>2.3</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<spring-boot.version>${spring-boot23.version}</spring-boot.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
|
<artifactId>jetty-bom</artifactId>
|
||||||
|
<version>${jetty.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.keycloak</groupId>
|
||||||
|
<artifactId>keycloak-spring-boot-2-adapter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>spring-boot-adapter-tomcat</id>
|
<id>spring-boot-adapter-tomcat</id>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -215,6 +215,13 @@
|
||||||
</properties>
|
</properties>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
||||||
|
<profile>
|
||||||
|
<id>springboot23</id>
|
||||||
|
<properties>
|
||||||
|
<springboot.version.option>2.3</springboot.version.option>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
|
||||||
<profile>
|
<profile>
|
||||||
<id>turn-on-repo-url</id>
|
<id>turn-on-repo-url</id>
|
||||||
<activation>
|
<activation>
|
||||||
|
|
Loading…
Reference in a new issue