token

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 26 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DeviceCodeLogin       = "devicecode"
	ServicePrincipalLogin = "spn"
	ROPCLogin             = "ropc"
	MSILogin              = "msi"
	AzureCLILogin         = "azurecli"
	WorkloadIdentityLogin = "workloadidentity"
)

Variables

View Source
var (
	DefaultTokenCacheDir = homedir.HomeDir() + "/.kube/cache/kubelogin/"
)

Functions

func GetSupportedLogins

func GetSupportedLogins() string

Types

type AzureCLIToken added in v0.0.9

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

func (*AzureCLIToken) Token added in v0.0.9

func (p *AzureCLIToken) Token() (adal.Token, error)

Token fetches an azcore.AccessToken from the Azure CLI SDK and converts it to an adal.Token for use with kubelogin.

type ExecCredentialPlugin

type ExecCredentialPlugin interface {
	Do() error
}

func New

type ExecCredentialWriter

type ExecCredentialWriter interface {
	Write(token adal.Token) error
}

type Options

type Options struct {
	LoginMethod   string
	ClientID      string
	ClientSecret  string
	ClientCert    string
	Username      string
	Password      string
	ServerID      string
	TenantID      string
	Environment   string
	IsLegacy      bool
	TokenCacheDir string

	IdentityResourceId     string
	FederatedTokenFile     string
	AuthorityHost          string
	UseAzureRMTerraformEnv bool
	// contains filtered or unexported fields
}

func NewOptions

func NewOptions() Options

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

func (*Options) String added in v0.0.2

func (o *Options) String() string

func (*Options) UpdateFromEnv

func (o *Options) UpdateFromEnv()

func (*Options) Validate

func (o *Options) Validate() error

type TokenCache

type TokenCache interface {
	Read(string) (adal.Token, error)
	Write(string, adal.Token) error
}

type TokenProvider

type TokenProvider interface {
	Token() (adal.Token, error)
}

Directories

Path Synopsis
Package mock_token is a generated GoMock package.
Package mock_token is a generated GoMock package.

Jump to

Keyboard shortcuts

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