Documentation ¶
Index ¶
- Variables
- func ClientID() string
- func ClientSecret() string
- func GetGraphToken(grantType OAuthGrantType) (adal.OAuthTokenProvider, error)
- func GetKeyvaultToken(grantType OAuthGrantType) (authorizer autorest.Authorizer, err error)
- func GetResourceManagementToken(grantType OAuthGrantType) (adal.OAuthTokenProvider, error)
- func TenantID() string
- type OAuthGrantType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UseCLIclientID sets if the Azure CLI client iD should be used on device authentication UseCLIclientID bool )
Functions ¶
func GetGraphToken ¶
func GetGraphToken(grantType OAuthGrantType) (adal.OAuthTokenProvider, error)
GetGraphToken gets an OAuth token for the graphrbac API using the specified grant type.
func GetKeyvaultToken ¶
func GetKeyvaultToken(grantType OAuthGrantType) (authorizer autorest.Authorizer, err error)
GetKeyvaultToken gets an authorizer for the keyvault dataplane
func GetResourceManagementToken ¶
func GetResourceManagementToken(grantType OAuthGrantType) (adal.OAuthTokenProvider, error)
GetResourceManagementToken gets an OAuth token for managing resources using the specified grant type.
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-auth flow OAuthGrantTypeDeviceFlow )
func AuthGrantType ¶
func AuthGrantType() OAuthGrantType
AuthGrantType returns what kind of authentication is going to be used: device flow or service principal
Click to show internal directories.
Click to hide internal directories.