IBM / java-sdk-core

Core functionality required by Java code generated by the IBM Cloud OpenAPI SDK Generator (openapi-sdkgen)
https://ibm.github.io/java-sdk-core/
Apache License 2.0
20 stars 21 forks source link

fix: Prevent double entries of Authorization header on second authenticate call #150

Closed eiri closed 3 years ago

eiri commented 3 years ago

When authenticate method called by BasicAuthenticator, BearerTokenAuthenticator or TokenRequestBasedAuthenticator second time on the same request it adds second Authorization header to the request. This can lead to a consecutive failure with 400 error from the services with strict rules about headers' double entries.

This PR switches named authenticators to use builder.header method to prevent that.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

ibm-devx-sdk commented 3 years ago

:tada: This PR is included in version 9.13.3 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: