tokencache

package
v0.71.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLoginTokenSource

func NewLoginTokenSource(
	cacheFile string,
	forceLogin bool,
	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.

If forceLogin is set the existing cached token will be invalidated and a new token will be retrieved from the token source.

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