token

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCredentials

func GetCredentials(auth Identity, log *zap.SugaredLogger) *refreshableTokenCredentials

func GetTokenWrapper

func GetTokenWrapper(base http.RoundTripper, auth Identity, log *zap.SugaredLogger) http.RoundTripper

Types

type ArmoryCloud

type ArmoryCloud struct {
	ClientId       string `yaml:"clientId,omitempty" json:"clientId,omitempty"`
	Secret         string `yaml:"secret,omitempty" json:"secret,omitempty"`
	TokenIssuerUrl string `yaml:"tokenIssuerUrl,omitempty" json:"tokenIssuerUrl,omitempty"`
	Audience       string `yaml:"audience,omitempty" json:"audience,omitempty"`
	Verify         bool   `yaml:"verify" json:"verify"`
}

func DefaultArmoryCloud

func DefaultArmoryCloud() ArmoryCloud

type Command

type Command struct {
	Command string   `yaml:"command,omitempty" json:"command,omitempty"`
	Args    []string `yaml:"args,omitempty" json:"args,omitempty"`
}

type Identity

type Identity struct {
	Token                   string      `yaml:"token,omitempty" json:"token,omitempty"`
	TokenCommand            *Command    `yaml:"tokenCommand,omitempty" json:"tokenCommand,omitempty"`
	Armory                  ArmoryCloud `yaml:"armory,omitempty" json:"armory,omitempty"`
	RefreshIntervalSeconds  int64       `yaml:"refreshIntervalSeconds" json:"refreshIntervalSeconds"`
	ExpirationLeewaySeconds int64       `yaml:"expirationLeewaySeconds" json:"expirationLeewaySeconds"`
}

func DefaultIdentity

func DefaultIdentity() Identity

type RemoteTokenSupplier added in v1.16.5

type RemoteTokenSupplier struct {
	// contains filtered or unexported fields
}

func NewRemoteTokenSupplier added in v1.16.5

func NewRemoteTokenSupplier(cloud ArmoryCloud) *RemoteTokenSupplier

func (*RemoteTokenSupplier) GetToken added in v1.16.5

func (r *RemoteTokenSupplier) GetToken(ctx context.Context) (string, *time.Time, error)

Jump to

Keyboard shortcuts

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