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

Kubernetes-commit: f54a08093d6d65be64fa9281622997126af966f8
This commit is contained in:
Haoran Wang 2017-05-09 14:04:42 +08:00 committed by Kubernetes Publisher
parent 650f6b4f1d
commit bb2e182124

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