iam

package
v0.0.0-...-e747c7c Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 ClientID

func ClientID() string

ClientID gets the client ID

func ClientSecret

func ClientSecret() string

ClientSecret gets the client secret

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.

func TenantID

func TenantID() string

TenantID gets the client ID

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

Jump to

Keyboard shortcuts

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