azidentity

package
v0.0.0-...-4fed4f1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 13 Imported by: 5

Documentation

Index

Constants

View Source
const (
	EnvAzureEnvironment                = "AZURE_ENVIRONMENT"
	EnvAzureAdditionallyAllowedTenants = "AZURE_ADDITIONALLY_ALLOWED_TENANTS"
	EnvAzureAuthorityHost              = "AZURE_AUTHORITY_HOST"
	EnvAzureClientCertificatePassword  = "AZURE_CLIENT_CERTIFICATE_PASSWORD" //nolint:gosec
	EnvAzureClientCertificatePath      = "AZURE_CLIENT_CERTIFICATE_PATH"
	EnvAzureClientID                   = "AZURE_CLIENT_ID"
	EnvAzureClientSecret               = "AZURE_CLIENT_SECRET" //nolint:gosec
	EnvAzureFederatedTokenFile         = "AZURE_FEDERATED_TOKEN_FILE"
	EnvAzurePassword                   = "AZURE_PASSWORD"
	EnvAzureRegionalAuthorityName      = "AZURE_REGIONAL_AUTHORITY_NAME"
	EnvAzureTenantID                   = "AZURE_TENANT_ID"
	EnvAzureUsername                   = "AZURE_USERNAME"
)
View Source
const (
	AzCliCachedExpiryTimeNegativeOffset = 5 * time.Minute
)

Variables

This section is empty.

Functions

func NewAzCliCachedCredential

func NewAzCliCachedCredential() (azcore.TokenCredential, error)

NewAzCliCachedCredential returns a new TokenCredential for az cli and token cache

func NewAzCliCredential

func NewAzCliCredential() (azcore.TokenCredential, error)

func NewAzDefaultCredential

func NewAzDefaultCredential(clientOptions *azcore.ClientOptions) (azcore.TokenCredential, error)

Types

type AccessTokenInfo

type AccessTokenInfo struct {
	Aud   *string `json:"aud"`
	Tid   *string `json:"tid"`
	AppId *string `json:"appid"`
	Oid   *string `json:"oid"`
	Upn   *string `json:"upn"`
}

func ParseAccessToken

func ParseAccessToken(token azcore.AccessToken) *AccessTokenInfo

func (*AccessTokenInfo) ToJsonString

func (t *AccessTokenInfo) ToJsonString() (info string)

func (*AccessTokenInfo) ToMap

func (t *AccessTokenInfo) ToMap() map[string]string

func (*AccessTokenInfo) ToString

func (t *AccessTokenInfo) ToString() string

type AzCliCachedCredential

type AzCliCachedCredential struct {
	azcore.TokenCredential
	// contains filtered or unexported fields
}

func (AzCliCachedCredential) GetToken

GetToken generates a token by calling az cli and caches it if possible for at least 10 minutes

Jump to

Keyboard shortcuts

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