Help us shape the future of Go! Take the 2026 Go Developer Survey

m2m

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(ctx context.Context, issuerURL, clientID, clientSecret string, scopes []string) (clientcredentials.Config, error)

func GetScopes added in v1.5.2

func GetScopes(hostName string, scopes []string) []string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL