From 1c2f49ab4ee19e9c42c7a77b6866ef5f90d8512e Mon Sep 17 00:00:00 2001 From: sebastien blanc Date: Tue, 25 Oct 2016 16:27:41 +0200 Subject: [PATCH] KEYCLOAK-3669: Fix Tomcat Adapter for 8.5.5 --- .../adapters/tomcat/KeycloakAuthenticatorValve.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/adapters/oidc/tomcat/tomcat8/src/main/java/org/keycloak/adapters/tomcat/KeycloakAuthenticatorValve.java b/adapters/oidc/tomcat/tomcat8/src/main/java/org/keycloak/adapters/tomcat/KeycloakAuthenticatorValve.java index 6a68dd3b8b..d227353ec7 100755 --- a/adapters/oidc/tomcat/tomcat8/src/main/java/org/keycloak/adapters/tomcat/KeycloakAuthenticatorValve.java +++ b/adapters/oidc/tomcat/tomcat8/src/main/java/org/keycloak/adapters/tomcat/KeycloakAuthenticatorValve.java @@ -39,9 +39,20 @@ import java.util.List; * @version $Revision: 1 $ */ public class KeycloakAuthenticatorValve extends AbstractKeycloakAuthenticatorValve { + + /** + * Method called by Tomcat < 8.5.5 + */ public boolean authenticate(Request request, HttpServletResponse response) throws IOException { return authenticateInternal(request, response, request.getContext().getLoginConfig()); } + + /** + * Method called by Tomcat >= 8.5.5 + */ + protected boolean doAuthenticate(Request request, HttpServletResponse response) throws IOException { + return this.authenticate(request, response); + } @Override protected boolean forwardToErrorPageInternal(Request request, HttpServletResponse response, Object loginConfig) throws IOException {