From 34d3be244d0054745eb7764e66c273c060f51bbe Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Mon, 2 Jun 2014 09:37:18 -0400 Subject: [PATCH] bump undertow version --- .../keycloak/adapters/RequestAuthenticator.java | 16 ++++++++++++---- model/invalidation-cache/model-adapters/pom.xml | 13 ------------- pom.xml | 2 +- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/RequestAuthenticator.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/RequestAuthenticator.java index 72a04934c0..349ba1121c 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/RequestAuthenticator.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/RequestAuthenticator.java @@ -32,10 +32,6 @@ public abstract class RequestAuthenticator { public AuthOutcome authenticate() { log.info("--> authenticate()"); - if (!facade.getRequest().isSecure() && deployment.isSslRequired()) { - log.warn("SSL is required to authenticate"); - return AuthOutcome.FAILED; - } BearerTokenRequestAuthenticator bearer = createBearerTokenAuthenticator(); log.info("try bearer"); AuthOutcome outcome = bearer.authenticate(facade); @@ -44,6 +40,7 @@ public abstract class RequestAuthenticator { log.info("Bearer FAILED"); return AuthOutcome.FAILED; } else if (outcome == AuthOutcome.AUTHENTICATED) { + if (verifySSL()) return AuthOutcome.FAILED; completeAuthentication(bearer); log.info("Bearer AUTHENTICATED"); return AuthOutcome.AUTHENTICATED; @@ -55,6 +52,7 @@ public abstract class RequestAuthenticator { log.info("try oauth"); if (isCached()) { + if (verifySSL()) return AuthOutcome.FAILED; log.info("AUTHENTICATED: was cached"); return AuthOutcome.AUTHENTICATED; } @@ -70,6 +68,8 @@ public abstract class RequestAuthenticator { } + if (verifySSL()) return AuthOutcome.FAILED; + completeAuthentication(oauth); // redirect to strip out access code and state query parameters @@ -81,6 +81,14 @@ public abstract class RequestAuthenticator { return AuthOutcome.AUTHENTICATED; } + protected boolean verifySSL() { + if (!facade.getRequest().isSecure() && deployment.isSslRequired()) { + log.warn("SSL is required to authenticate"); + return true; + } + return false; + } + protected abstract OAuthRequestAuthenticator createOAuthAuthenticator(); protected BearerTokenRequestAuthenticator createBearerTokenAuthenticator() { diff --git a/model/invalidation-cache/model-adapters/pom.xml b/model/invalidation-cache/model-adapters/pom.xml index ff704e90bc..c6b12f5656 100755 --- a/model/invalidation-cache/model-adapters/pom.xml +++ b/model/invalidation-cache/model-adapters/pom.xml @@ -66,19 +66,6 @@ - - org.keycloak - keycloak-model-tests - ${project.version} - test - - - org.keycloak - keycloak-model-tests - ${project.version} - tests - test - com.h2database h2 diff --git a/pom.xml b/pom.xml index 95d0478145..0eb88f0533 100755 --- a/pom.xml +++ b/pom.xml @@ -18,7 +18,7 @@ 2.3.7.Final 2.3.7.Final 3.0.8.Final - 1.0.0.Final + 1.0.15.Final 2.6.0.CR2 1.0.2.Final 2.11.3