From 098c174034f110c9c2fde89beaa78898631b4b77 Mon Sep 17 00:00:00 2001 From: Carles Arnal Date: Fri, 6 Oct 2023 10:49:47 +0200 Subject: [PATCH] Do not close auth client in password grant flow --- .../common/apps/auth/authn/AppAuthenticationMechanism.java | 1 - 1 file changed, 1 deletion(-) diff --git a/auth/src/main/java/io/apicurio/common/apps/auth/authn/AppAuthenticationMechanism.java b/auth/src/main/java/io/apicurio/common/apps/auth/authn/AppAuthenticationMechanism.java index 6bdee21..a36054b 100644 --- a/auth/src/main/java/io/apicurio/common/apps/auth/authn/AppAuthenticationMechanism.java +++ b/auth/src/main/java/io/apicurio/common/apps/auth/authn/AppAuthenticationMechanism.java @@ -162,7 +162,6 @@ public Uni customAuthentication(RoutingContext context, Identi if (credentialsFromContext != null) { OidcAuth oidcAuth = new OidcAuth(httpClient, clientId, clientSecret.get()); String jwtToken = oidcAuth.obtainAccessTokenPasswordGrant(credentialsFromContext.getLeft(), credentialsFromContext.getRight()); - oidcAuth.close(); if (jwtToken != null) { //If we manage to get a token from basic credentials, try to authenticate it using the fetched token using the identity provider manager context.request().headers().set("Authorization", "Bearer " + jwtToken);