Versions in this module Expand all Collapse all v0 v0.20241126.1723 Nov 26, 2024 Changes in this version + func SetAuthHeader(ctx context.Context, req *http.Request, authorizer Authorizer) error + type Authorizer interface + AuxiliaryTokens func(ctx context.Context, request *http.Request) ([]*oauth2.Token, error) + Token func(ctx context.Context, request *http.Request) (*oauth2.Token, error) + func NewAuthorizerFromCredentials(ctx context.Context, c Credentials, api environments.Api) (Authorizer, error) + func NewAzureCliAuthorizer(ctx context.Context, options AzureCliAuthorizerOptions) (Authorizer, error) + func NewClientCertificateAuthorizer(ctx context.Context, options ClientCertificateAuthorizerOptions) (Authorizer, error) + func NewClientSecretAuthorizer(ctx context.Context, options ClientSecretAuthorizerOptions) (Authorizer, error) + func NewGitHubOIDCAuthorizer(ctx context.Context, options GitHubOIDCAuthorizerOptions) (Authorizer, error) + func NewManagedIdentityAuthorizer(ctx context.Context, options ManagedIdentityAuthorizerOptions) (Authorizer, error) + func NewOIDCAuthorizer(ctx context.Context, options OIDCAuthorizerOptions) (Authorizer, error) + type AzureCliAuthorizer struct + DefaultSubscriptionID string + SubscriptionIDHint string + TenantID string + func (a *AzureCliAuthorizer) AuxiliaryTokens(_ context.Context, _ *http.Request) ([]*oauth2.Token, error) + func (a *AzureCliAuthorizer) Token(_ context.Context, _ *http.Request) (*oauth2.Token, error) + type AzureCliAuthorizerOptions struct + Api environments.Api + AuxTenantIds []string + SubscriptionIdHint string + TenantId string + type CachedAuthorizer struct + Source Authorizer + func (c *CachedAuthorizer) AuxiliaryTokens(ctx context.Context, req *http.Request) ([]*oauth2.Token, error) + func (c *CachedAuthorizer) InvalidateCachedTokens() error + func (c *CachedAuthorizer) Token(ctx context.Context, req *http.Request) (*oauth2.Token, error) + type CachingAuthorizer interface + InvalidateCachedTokens func() error + func NewCachedAuthorizer(src Authorizer) (CachingAuthorizer, error) + type ClientAssertionAuthorizer struct + func (a *ClientAssertionAuthorizer) AuxiliaryTokens(ctx context.Context, _ *http.Request) ([]*oauth2.Token, error) + func (a *ClientAssertionAuthorizer) Token(ctx context.Context, _ *http.Request) (*oauth2.Token, error) + type ClientCertificateAuthorizerOptions struct + Api environments.Api + AuxTenantIds []string + ClientId string + Environment environments.Environment + Pkcs12Data []byte + Pkcs12Pass string + Pkcs12Path string + TenantId string + type ClientSecretAuthorizer struct + func (a *ClientSecretAuthorizer) AuxiliaryTokens(ctx context.Context, _ *http.Request) ([]*oauth2.Token, error) + func (a *ClientSecretAuthorizer) Token(ctx context.Context, _ *http.Request) (*oauth2.Token, error) + type ClientSecretAuthorizerOptions struct + Api environments.Api + AuxTenantIds []string + ClientId string + ClientSecret string + Environment environments.Environment + TenantId string + type Credentials struct + AuxiliaryTenantIDs []string + AzureCliSubscriptionIDHint string + ClientCertificateData []byte + ClientCertificatePassword string + ClientCertificatePath string + ClientID string + ClientSecret string + CustomManagedIdentityEndpoint string + EnableAuthenticatingUsingAzureCLI bool + EnableAuthenticatingUsingClientCertificate bool + EnableAuthenticatingUsingClientSecret bool + EnableAuthenticatingUsingManagedIdentity bool + EnableAuthenticationUsingGitHubOIDC bool + EnableAuthenticationUsingOIDC bool + Environment environments.Environment + GitHubOIDCTokenRequestToken string + GitHubOIDCTokenRequestURL string + OIDCAssertionToken string + TenantID string + type GitHubOIDCAuthorizer struct + func (a *GitHubOIDCAuthorizer) AuxiliaryTokens(ctx context.Context, req *http.Request) ([]*oauth2.Token, error) + func (a *GitHubOIDCAuthorizer) Token(ctx context.Context, req *http.Request) (*oauth2.Token, error) + type GitHubOIDCAuthorizerOptions struct + Api environments.Api + AuxiliaryTenantIds []string + ClientId string + Environment environments.Environment + IdTokenRequestToken string + IdTokenRequestUrl string + TenantId string + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + var Client HTTPClient + var MetadataClient HTTPClient + type ManagedIdentityAuthorizer struct + func (a *ManagedIdentityAuthorizer) AuxiliaryTokens(_ context.Context, _ *http.Request) ([]*oauth2.Token, error) + func (a *ManagedIdentityAuthorizer) Token(ctx context.Context, _ *http.Request) (*oauth2.Token, error) + type ManagedIdentityAuthorizerOptions struct + Api environments.Api + ClientId string + CustomManagedIdentityEndpoint string + type OIDCAuthorizerOptions struct + Api environments.Api + AuxiliaryTenantIds []string + ClientId string + Environment environments.Environment + FederatedAssertion string + TenantId string + type SharedKeyAuthorizer struct + func NewSharedKeyAuthorizer(accountName string, accountKey string, keyType SharedKeyType) (*SharedKeyAuthorizer, error) + func (s *SharedKeyAuthorizer) AuxiliaryTokens(_ context.Context, _ *http.Request) ([]*oauth2.Token, error) + func (s *SharedKeyAuthorizer) Token(ctx context.Context, req *http.Request) (*oauth2.Token, error) + type SharedKeyType string + const SharedKey + const SharedKeyTable