Documentation
¶
Index ¶
- func NewBasicTokenSource(ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, ...) (oauth2.TokenSource, error)
- func NewPostTokenSource(ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, ...) (oauth2.TokenSource, error)
- func NewPrivateKeyJWTTokenSource(ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, ...) (oauth2.TokenSource, error)
- func NewRemoteSignerTokenSource(ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, ...) (oauth2.TokenSource, error)
- func ResolveTokenEndpoint(ctx context.Context, cfg config.ConfigurationOAUTH2) (string, error)
- type Style
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBasicTokenSource ¶
func NewBasicTokenSource( ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, tokenURL string, ) (oauth2.TokenSource, error)
NewBasicTokenSource returns an oauth2.TokenSource that authenticates with client_secret_basic (HTTP Basic auth).
func NewPostTokenSource ¶
func NewPostTokenSource( ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, tokenURL string, ) (oauth2.TokenSource, error)
NewPostTokenSource returns an oauth2.TokenSource that authenticates with client_secret_post (credentials in the POST body).
func NewPrivateKeyJWTTokenSource ¶
func NewPrivateKeyJWTTokenSource( ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, tokenURL string, ) (oauth2.TokenSource, error)
NewPrivateKeyJWTTokenSource returns an oauth2.TokenSource that authenticates using the private_key_jwt method (RFC 7523).
func NewRemoteSignerTokenSource ¶ added in v1.78.1
func NewRemoteSignerTokenSource( ctx context.Context, httpClient *http.Client, cfg config.ConfigurationOAUTH2, tokenURL string, ) (oauth2.TokenSource, error)
NewRemoteSignerTokenSource returns an oauth2.TokenSource that authenticates using a remote signing service for private_key_jwt (RFC 7523). It calls the signing endpoint to get a signed JWT client assertion, then exchanges it at the token endpoint.
func ResolveTokenEndpoint ¶
ResolveTokenEndpoint determines the token endpoint URL from config, using OIDC discovery if needed.