Skip to content

Commit

Permalink
CAMEL-20624: Fix bug in camel-http to avoid duplicate OAuth2 Authoriz…
Browse files Browse the repository at this point in the history
…ation headers (#13629)
  • Loading branch information
joshuagrisham-karolinska committed Mar 28, 2024
1 parent 630b74d commit 8b2bdb1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -61,7 +61,7 @@ public void configureHttpClient(HttpClientBuilder clientBuilder) {

if (response.getCode() == 200) {
String accessToken = ((JsonObject) Jsoner.deserialize(responseString)).getString("access_token");
request.addHeader(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken);
request.setHeader(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken);
} else {
throw new HttpException(
"Received error response from token request with Status Code: " + response.getCode());
Expand Down

0 comments on commit 8b2bdb1

Please sign in to comment.