auth

package
v10.15.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthorizerFromEnvironment

func NewAuthorizerFromEnvironment() (autorest.Authorizer, error)

NewAuthorizerFromEnvironment creates an Authorizer configured from environment variables in the order: 1. Client credentials 2. Client certificate 3. Username password 4. MSI

func NewAuthorizerFromEnvironmentWithResource

func NewAuthorizerFromEnvironmentWithResource(resource string) (autorest.Authorizer, error)

NewAuthorizerFromEnvironmentWithResource creates an Authorizer configured from environment variables in the order: 1. Client credentials 2. Client certificate 3. Username password 4. MSI

func NewAuthorizerFromFile

func NewAuthorizerFromFile(baseURI string) (autorest.Authorizer, error)

NewAuthorizerFromFile creates an Authorizer configured from a configuration file.

Types

type AuthorizerConfig

type AuthorizerConfig interface {
	Authorizer() (autorest.Authorizer, error)
}

AuthorizerConfig provides an authorizer from the configuration provided.

type ClientCertificateConfig

type ClientCertificateConfig struct {
	ClientID            string
	CertificatePath     string
	CertificatePassword string
	TenantID            string
	AADEndpoint         string
	Resource            string
}

ClientCertificateConfig provides the options to get a bearer authorizer from a client certificate.

func NewClientCertificateConfig

func NewClientCertificateConfig(certificatePath string, certificatePassword string, clientID string, tenantID string) ClientCertificateConfig

NewClientCertificateConfig creates a ClientCertificateConfig object configured to obtain an Authorizer through client certificate. Defaults to Public Cloud and Resource Manager Endpoint.

func (ClientCertificateConfig) Authorizer

func (ccc ClientCertificateConfig) Authorizer() (autorest.Authorizer, error)

Authorizer gets an authorizer object from client certificate.

type ClientCredentialsConfig

type ClientCredentialsConfig struct {
	ClientID     string
	ClientSecret string
	TenantID     string
	AADEndpoint  string
	Resource     string
}

ClientCredentialsConfig provides the options to get a bearer authorizer from client credentials.

func NewClientCredentialsConfig

func NewClientCredentialsConfig(clientID string, clientSecret string, tenantID string) ClientCredentialsConfig

NewClientCredentialsConfig creates an AuthorizerConfig object configured to obtain an Authorizer through Client Credentials. Defaults to Public Cloud and Resource Manager Endpoint.

func (ClientCredentialsConfig) Authorizer

func (ccc ClientCredentialsConfig) Authorizer() (autorest.Authorizer, error)

Authorizer gets the authorizer from client credentials.

type DeviceFlowConfig

type DeviceFlowConfig struct {
	ClientID    string
	TenantID    string
	AADEndpoint string
	Resource    string
}

DeviceFlowConfig provides the options to get a bearer authorizer using device flow authentication.

func NewDeviceFlowConfig

func NewDeviceFlowConfig(clientID string, tenantID string) DeviceFlowConfig

NewDeviceFlowConfig creates a DeviceFlowConfig object configured to obtain an Authorizer through device flow. Defaults to Public Cloud and Resource Manager Endpoint.

func (DeviceFlowConfig) Authorizer

func (dfc DeviceFlowConfig) Authorizer() (autorest.Authorizer, error)

Authorizer gets the authorizer from device flow.

type MSIConfig

type MSIConfig struct {
	Resource string
	ClientID string
}

MSIConfig provides the options to get a bearer authorizer through MSI.

func NewMSIConfig

func NewMSIConfig() MSIConfig

NewMSIConfig creates an MSIConfig object configured to obtain an Authorizer through MSI.

func (MSIConfig) Authorizer

func (mc MSIConfig) Authorizer() (autorest.Authorizer, error)

Authorizer gets the authorizer from MSI.

type UsernamePasswordConfig

type UsernamePasswordConfig struct {
	ClientID    string
	Username    string
	Password    string
	TenantID    string
	AADEndpoint string
	Resource    string
}

UsernamePasswordConfig provides the options to get a bearer authorizer from a username and a password.

func NewUsernamePasswordConfig

func NewUsernamePasswordConfig(username string, password string, clientID string, tenantID string) UsernamePasswordConfig

NewUsernamePasswordConfig creates an UsernamePasswordConfig object configured to obtain an Authorizer through username and password. Defaults to Public Cloud and Resource Manager Endpoint.

func (UsernamePasswordConfig) Authorizer

func (ups UsernamePasswordConfig) Authorizer() (autorest.Authorizer, error)

Authorizer gets the authorizer from a username and a password.

Jump to

Keyboard shortcuts

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