From 642fc996fb6e8a6fc7862118672032d1cfafc176 Mon Sep 17 00:00:00 2001 From: Leonardo Loch Zanivan Date: Tue, 21 Apr 2015 16:22:14 -0300 Subject: [PATCH] Basic Auth token fix --- .../org/keycloak/adapters/BasicAuthRequestAuthenticator.java | 1 + .../org/keycloak/adapters/BearerTokenRequestAuthenticator.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java index 51ddfd5efd..6f8f64945c 100644 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/BasicAuthRequestAuthenticator.java @@ -53,6 +53,7 @@ public class BasicAuthRequestAuthenticator extends BearerTokenRequestAuthenticat String[] parts=userpw.split(":"); atr = getToken(parts[0], parts[1]); + tokenString = atr.getToken(); } catch (Exception e) { log.debug("Failed to obtain token", e); challenge = challengeResponse(exchange, "no_token", e.getMessage()); diff --git a/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java b/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java index 5730ca6774..a1a68dfce9 100755 --- a/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java +++ b/integration/adapter-core/src/main/java/org/keycloak/adapters/BearerTokenRequestAuthenticator.java @@ -64,7 +64,6 @@ public class BearerTokenRequestAuthenticator { protected AuthOutcome authenticateToken(HttpFacade exchange, String tokenString) { try { - this.tokenString = tokenString; token = RSATokenVerifier.verifyToken(tokenString, deployment.getRealmKey(), deployment.getRealmInfoUrl()); } catch (VerificationException e) { log.error("Failed to verify token", e);