Documentation
¶
Index ¶
- func GetConfig(ctx context.Context, issuerURL, clientID, clientSecret string, scopes []string) (clientcredentials.Config, error)
- func GetScopes(hostName string, scopes []string) []string
- func GetTokenSource(config clientcredentials.Config) oauth2.TokenSource
- func NewAuthenticator(clientID, clientSecret, hostName string) auth.Authenticator
- func NewAuthenticatorWithScopes(clientID, clientSecret, hostName string, scopes []string) auth.Authenticator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetScopes ¶ added in v1.5.2
GetScopes returns scopes unchanged, defaulting to "all-apis" only when empty so a least-privilege secret (e.g. scoped to "sql") can authenticate.
func GetTokenSource ¶
func GetTokenSource(config clientcredentials.Config) oauth2.TokenSource
func NewAuthenticator ¶
func NewAuthenticator(clientID, clientSecret, hostName string) auth.Authenticator
func NewAuthenticatorWithScopes ¶ added in v1.5.2
func NewAuthenticatorWithScopes(clientID, clientSecret, hostName string, scopes []string) auth.Authenticator
NewAuthenticatorWithScopes requests exactly the given scopes, or "all-apis" when scopes is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.