tokencache

package
v0.122.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearLoginCache added in v0.72.0

func ClearLoginCache(cacheFile string) error

ClearLoginCache will clear the login entry in the passed cache file. This can be used to "logout" principal.

func NewLoginTokenSource

func NewLoginTokenSource(
	cacheFile string,
	oauthTokenSource oauth2.TokenSource,
	oauthConfig oAuth2Config,
) oauth2.TokenSource

NewLoginTokenSource will create a token source that caches login tokens. Only one login token will be cached at a time.

The tokens will be cached under `login` in the cache file.

func NewServicePrincipalTokenSource

func NewServicePrincipalTokenSource(
	cacheFile string,
	clientID string,
	oauthTokenSource oauth2.TokenSource,
) oauth2.TokenSource

NewServicePrincipalTokenSource will create a token source that caches service principal tokens. The tokens will be cached under `service-principals` in the cache file.

func NewWorkloadTokenSource

func NewWorkloadTokenSource(
	cacheFile string,
	providerResourceName string,
	oauthTokenSource oauth2.TokenSource,
) oauth2.TokenSource

NewWorkloadTokenSource will create a token source that caches workload identity provider tokens. The tokens will be cached under `workloads` in the cache file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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