Documentation
¶
Index ¶
Constants ¶
View Source
const ( DeviceCodeLogin = "devicecode" InteractiveLogin = "interactive" ServicePrincipalLogin = "spn" ROPCLogin = "ropc" MSILogin = "msi" AzureCLILogin = "azurecli" AzureDeveloperCLILogin = "azd" WorkloadIdentityLogin = "workloadidentity" )
Variables ¶
View Source
var (
DefaultTokenCacheDir = homedir.HomeDir() + "/.kube/cache/kubelogin/"
)
Functions ¶
func GetSupportedLogins ¶
func GetSupportedLogins() string
Types ¶
type AzureCLIToken ¶
type AzureCLIToken struct {
// contains filtered or unexported fields
}
type AzureDeveloperCLIToken ¶ added in v0.1.1
type AzureDeveloperCLIToken struct {
// contains filtered or unexported fields
}
type ExecCredentialPlugin ¶
func New ¶
func New(o *Options) (ExecCredentialPlugin, error)
type ExecCredentialWriter ¶
type InteractiveToken ¶
type InteractiveToken struct {
// contains filtered or unexported fields
}
func (*InteractiveToken) Token ¶
Token fetches an azcore.AccessToken from the interactive browser SDK and converts it to an adal.Token for use with kubelogin.
func (*InteractiveToken) TokenWithOptions ¶
func (p *InteractiveToken) TokenWithOptions(ctx context.Context, options *azcore.ClientOptions) (adal.Token, error)
type Options ¶
type Options struct {
LoginMethod string
ClientID string
ClientSecret string
ClientCert string
ClientCertPassword string
Username string
Password string
ServerID string
TenantID string
Environment string
IsLegacy bool
Timeout time.Duration
TokenCacheDir string
IdentityResourceID string
FederatedTokenFile string
AuthorityHost string
UseAzureRMTerraformEnv bool
IsPoPTokenEnabled bool
PoPTokenClaims string
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions() Options
func (*Options) UpdateFromEnv ¶
func (o *Options) UpdateFromEnv()
type TokenCache ¶
type TokenProvider ¶
func NewTokenProvider ¶
func NewTokenProvider(o *Options) (TokenProvider, error)
NewTokenProvider creates the TokenProvider instance with giving options.
Source Files
¶
- azurecli.go
- azuredevelopercli.go
- devicecode.go
- execCredentialPlugin.go
- execCredentialWriter.go
- federatedIdentity.go
- interactive.go
- manualtoken.go
- msi.go
- options.go
- provider.go
- ropc.go
- serviceprincipaltoken.go
- serviceprincipaltoken_legacy.go
- serviceprincipaltokencertificate.go
- serviceprincipaltokensecret.go
- tokenCache.go
Click to show internal directories.
Click to hide internal directories.