Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthTransport ¶ added in v4.61.0
func NewAuthTransport(ts oauth2.TokenSource) http.RoundTripper
NewAuthTransport creates a new TokenAuthTransport with the provided TokenSource
func TokenAuthEditor ¶ added in v4.61.0
TokenAuthEditor returns a custom RequestEditorFn to inject the OAuth2 token
Types ¶
type RewriterFunc ¶ added in v4.61.0
RewriterFunc is a function that can be used to rewrite the request before it is sent
type TokenAuthTransport ¶ added in v4.61.0
type TokenAuthTransport struct {
TokenSource oauth2.TokenSource // required
BaseTransport http.RoundTripper
Rewriter RewriterFunc
}
TokenAuthTransport is a custom http.RoundTripper to inject the OAuth2 token