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.
When
authenticate
method called byBasicAuthenticator
,BearerTokenAuthenticator
orTokenRequestBasedAuthenticator
second time on the same request it adds secondAuthorization
header to the request. This can lead to a consecutive failure with400
error from the services with strict rules about headers' double entries.This PR switches named authenticators to use
builder.header
method to prevent that.