diff --git a/components/org.wso2.carbon.identity.conditional.auth.functions.choreo/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/choreo/CallChoreoFunctionImpl.java b/components/org.wso2.carbon.identity.conditional.auth.functions.choreo/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/choreo/CallChoreoFunctionImpl.java index aeb3e1fe..ff4e4fd0 100644 --- a/components/org.wso2.carbon.identity.conditional.auth.functions.choreo/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/choreo/CallChoreoFunctionImpl.java +++ b/components/org.wso2.carbon.identity.conditional.auth.functions.choreo/src/main/java/org/wso2/carbon/identity/conditional/auth/functions/choreo/CallChoreoFunctionImpl.java @@ -343,7 +343,8 @@ public void completed(HttpResponse httpResponse) { boolean isFailure = false; try { - LOG.debug("Access token response received."); + LOG.info("Access token response received. Session data key: " + + authenticationContext.getContextIdentifier()); int responseCode = httpResponse.getStatusLine().getStatusCode(); if (responseCode == HTTP_STATUS_OK) { Type responseBodyType = new TypeToken>() { }.getType(); @@ -372,6 +373,8 @@ public void completed(HttpResponse httpResponse) { LOG.error("Error occurred while handling the token response from Choreo. Session data key: " + authenticationContext.getContextIdentifier(), e); isFailure = true; + } finally { + EntityUtils.consumeQuietly(httpResponse.getEntity()); } if (isFailure) {