Documentation ¶
Index ¶
- func GetBatchAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
- func GetGraphAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
- func GetGroupsAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
- func GetKeyvaultAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
- func GetMSITokenForResource(resource string) (*adal.ServicePrincipalToken, error)
- func GetMSITokenForResourceByClientID(resource string, clientID string) (*adal.ServicePrincipalToken, error)
- func GetMSITokenProviderForResource(resource string) (func() (string, error), error)
- func GetMSITokenProviderForResourceByClientID(resource string, clientID string) (func() (string, error), error)
- func GetResourceManagementAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
- type OAuthGrantType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBatchAuthorizer ¶
func GetBatchAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
GetBatchAuthorizer gets an OAuthTokenAuthorizer for Azure Batch.
func GetGraphAuthorizer ¶
func GetGraphAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
GetGraphAuthorizer gets an OAuthTokenAuthorizer for graphrbac API.
func GetGroupsAuthorizer ¶
func GetGroupsAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
GetGroupsAuthorizer gets an OAuthTokenAuthorizer for resource group API.
func GetKeyvaultAuthorizer ¶
func GetKeyvaultAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
GetKeyvaultAuthorizer gets an OAuthTokenAuthorizer for use with Key Vault keys and secrets. Note that Key Vault *Vaults* are managed by Azure Resource Manager.
func GetMSITokenForResource ¶
func GetMSITokenForResource(resource string) (*adal.ServicePrincipalToken, error)
GetMSITokenForResource returns the MSI token for a resource
func GetMSITokenForResourceByClientID ¶
func GetMSITokenForResourceByClientID(resource string, clientID string) (*adal.ServicePrincipalToken, error)
GetMSITokenForResourceByClientID returns the MSI token for a resource by the client ID
func GetMSITokenProviderForResource ¶
GetMSITokenProviderForResource gets a token provider for the given resource. A token provider is just a function that returns the OAuth token when called
func GetResourceManagementAuthorizer ¶
func GetResourceManagementAuthorizer(creds config.Credentials) (autorest.Authorizer, error)
GetResourceManagementAuthorizer gets an OAuthTokenAuthorizer for Azure Resource Manager
Types ¶
type OAuthGrantType ¶
type OAuthGrantType int
OAuthGrantType specifies which grant type to use.
const ( // OAuthGrantTypeServicePrincipal for client credentials flow OAuthGrantTypeServicePrincipal OAuthGrantType = iota // OAuthGrantTypeDeviceFlow for device flow OAuthGrantTypeDeviceFlow // OAuthGrantTypeManagedIdentity for aad-pod-identity OAuthGrantTypeManagedIdentity )