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 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 ResolveTokenEndpoint ¶
ResolveTokenEndpoint determines the token endpoint URL from config, using OIDC discovery if needed.
Types ¶
Click to show internal directories.
Click to hide internal directories.