Skip to content

Commit

Permalink
Add WrappedRoundTripper() to tokenSourceTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud authored and brandond committed Sep 16, 2021
1 parent 32b7b20 commit ec39217
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions staging/src/k8s.io/client-go/transport/token_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ type tokenSourceTransport struct {
src ResettableTokenSource
}

func (tst *tokenSourceTransport) WrappedRoundTripper() http.RoundTripper {
return tst.base
}

func (tst *tokenSourceTransport) RoundTrip(req *http.Request) (*http.Response, error) {
// This is to allow --token to override other bearer token providers.
if req.Header.Get("Authorization") != "" {
Expand Down

0 comments on commit ec39217

Please sign in to comment.