MCPcopy Create free account
hub / github.com/prometheus/common / TokenSource

Method TokenSource

config/oauth_assertion.go:88–90  ·  view source on GitHub ↗

TokenSource returns a JWT TokenSource using the configuration in c and the HTTP client from the provided context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

86// TokenSource returns a JWT TokenSource using the configuration
87// in c and the HTTP client from the provided context.
88func (c *JwtGrantTypeConfig) TokenSource(ctx context.Context) oauth2.TokenSource {
89 return oauth2.ReuseTokenSource(nil, jwtSource{ctx, c})
90}
91
92// Client returns an HTTP client wrapping the context's
93// HTTP transport and adding Authorization headers with tokens

Callers 1

ClientMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected