KEYCLOAK-13915 Update Jetty 9.4.x dependency to latest version

Adapted Jetty94SessionManager to workaround Jetty 9.4 API changes.
The Method org.eclipse.jetty.server.session.SessionHandler#getHttpSession
was changed from public to protected which makes it no longer accessible.

As a workaround the method contents were inlined.
This commit is contained in:
Thomas Darimont 2020-05-22 22:52:55 +02:00 committed by Bruno Oliveira da Silva
parent 65c425e774
commit 152588ecc4
2 changed files with 12 additions and 3 deletions

View file

@ -17,6 +17,7 @@
package org.keycloak.adapters.jetty;
import org.eclipse.jetty.server.session.Session;
import org.eclipse.jetty.server.session.SessionHandler;
import org.keycloak.adapters.jetty.spi.JettySessionManager;
@ -34,7 +35,15 @@ public class Jetty94SessionManager implements JettySessionManager {
}
@Override
public HttpSession getHttpSession(String id) {
return sessionHandler.getHttpSession(id);
public HttpSession getHttpSession(String extendedId) {
// 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;
}
}

View file

@ -105,7 +105,7 @@
<elytron.undertow-server.version>1.7.1.Final</elytron.undertow-server.version>
<jetty92.version>9.2.4.v20141103</jetty92.version>
<jetty93.version>9.3.9.v20160517</jetty93.version>
<jetty94.version>9.4.2.v20170220</jetty94.version>
<jetty94.version>9.4.29.v20200521</jetty94.version>
<woodstox.version>6.0.3</woodstox.version>
<xmlsec.version>2.1.4</xmlsec.version>
<glassfish.json.version>1.1.6</glassfish.json.version>