diff --git a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java index ea134e7e4..81257868b 100644 --- a/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java +++ b/camunda-sdk-java/java-common/src/main/java/io/camunda/common/auth/SelfManagedAuthentication.java @@ -6,6 +6,7 @@ import org.apache.hc.client5.http.classic.methods.HttpPost; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse; +import org.apache.hc.client5.http.impl.classic.HttpClients; import org.apache.hc.core5.http.HttpStatus; import org.apache.hc.core5.http.io.entity.EntityUtils; import org.apache.hc.core5.http.io.entity.StringEntity; @@ -81,7 +82,7 @@ public void resetToken(Product product) { } private String retrieveToken(Product product, JwtCredential jwtCredential) { - try(CloseableHttpClient client = HttpClient.getInstance()) { + try(CloseableHttpClient client = HttpClients.createDefault()) { HttpPost request = buildRequest(jwtCredential); TokenResponse tokenResponse = client.execute(