From 4813d3954167b97aa16af39d7062cde8e8cdd9c6 Mon Sep 17 00:00:00 2001 From: shanggeeth Date: Sun, 19 May 2024 21:54:23 +0530 Subject: [PATCH] Fix failures due to new changes --- .../auth/functions/http/AbstractHTTPFunction.java | 12 ++++++++---- .../pom.xml | 4 ---- pom.xml | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/AbstractHTTPFunction.java b/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/AbstractHTTPFunction.java index b0971046..c3f60d8d 100644 --- a/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/AbstractHTTPFunction.java +++ b/components/org.wso2.carbon.identity.conditional.auth.functions.http/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/http/AbstractHTTPFunction.java @@ -46,6 +46,7 @@ import java.net.SocketTimeoutException; import java.net.URI; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -94,15 +95,18 @@ public boolean shouldRetry() { protected void executeHttpMethod(HttpUriRequest clientRequest, Map eventHandlers, AuthConfigModel authConfigModel) { + Map eventHandlersMap = new HashMap<>(eventHandlers); + AuthConfigModel authConfigModelClone = authConfigModel == null ? null : new AuthConfigModel(authConfigModel.getType(), + new HashMap<>(authConfigModel.getProperties())); AsyncProcess asyncProcess = new AsyncProcess((context, asyncReturn) -> { String outcome; String endpointURL = null; HttpUriRequest request; try { - if (authConfigModel != null) { - AuthConfig authConfig = AuthConfigFactory.getAuthConfig(authConfigModel, context, asyncReturn); - request = authConfig.applyAuth(clientRequest, authConfigModel); + if (authConfigModelClone != null) { + AuthConfig authConfig = AuthConfigFactory.getAuthConfig(authConfigModelClone, context, asyncReturn); + request = authConfig.applyAuth(clientRequest, authConfigModelClone); } else { request = clientRequest; } @@ -130,7 +134,7 @@ protected void executeHttpMethod(HttpUriRequest clientRequest, Map4.9.17 [4.6.0, 5.0.0) [1.0.1, 2.0.0) - 7.0.74-SNAPSHOT + 7.2.26-SNAPSHOT 1.0.89 5.20.447 [5.14.0, 8.0.0)