From 7e8bcda7680ea7d73c6192378d20ec3d28264f93 Mon Sep 17 00:00:00 2001 From: richard-9000 <53876487+richard-9000@users.noreply.github.com> Date: Mon, 17 Jan 2022 14:34:17 -0800 Subject: [PATCH] Fixed uriInfo to work with keycloak standalone for jboss This class would error out after return from Duo prompt with a java error missing method getUriInfo in jboss resteasy. Deployed / tested in keycloak 16.1.0 --- .../com.instipod.duouniversal/DuoUniversalAuthenticator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com.instipod.duouniversal/DuoUniversalAuthenticator.java b/src/main/java/com.instipod.duouniversal/DuoUniversalAuthenticator.java index e0833df..5d6414f 100644 --- a/src/main/java/com.instipod.duouniversal/DuoUniversalAuthenticator.java +++ b/src/main/java/com.instipod.duouniversal/DuoUniversalAuthenticator.java @@ -137,7 +137,7 @@ public void authenticate(AuthenticationFlowContext authenticationFlowContext) { String loginState = authenticationFlowContext.getAuthenticationSession().getAuthNote("DUO_STATE"); String loginUsername = authenticationFlowContext.getAuthenticationSession().getAuthNote("DUO_USERNAME"); - MultivaluedMap queryParams = authenticationFlowContext.getHttpRequest().getUri().getQueryParameters(); + MultivaluedMap queryParams = authenticationFlowContext.getUriInfo().getQueryParameters(); if (queryParams.containsKey("state") && queryParams.containsKey("duo_code")) { String state = queryParams.getFirst("state"); String duoCode = queryParams.getFirst("duo_code");