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

This commit is contained in:
Haoran Wang 2017-05-09 14:04:42 +08:00
parent 15f0468986
commit f54a08093d

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