Merge pull request #45529 from wanghaoran1988/fix_issue_44476

Automatic merge from submit-queue

oidc auth plugin not to override the Auth header if it's already exits

**What this PR does / why we need it**:
oidc auth client plugin should not override the `Authorization` header if it's already exits.
**Which issue this PR fixes** : 
fix oidc auth plugin override the` Authorization` header
**Special notes for your reviewer**:

**Release note**:
pull/6/head
Kubernetes Submit Queue 2017-05-09 12:52:53 -07:00 committed by GitHub
commit 52e8d6b95c
1 changed files with 3 additions and 0 deletions

View File

@ -216,6 +216,9 @@ type roundTripper struct {
}
func (r *roundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
if len(req.Header.Get("Authorization")) != 0 {
return r.wrapped.RoundTrip(req)
}
token, err := r.provider.idToken()
if err != nil {
return nil, err