auth

package module
v0.1.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 10 Imported by: 0

README

Azure / Auth

Installation: go get github.com/whiteducksoftware/golang-utilities/azure/auth

Types & Functions

package auth

// SDKAuth represents an Azure AD Service Principal
type SDKAuth struct {}

// FromString fills the struct with the information from the input json string
func (auth *SDKAuth) FromString(credentials string) error {}

// GetResourceManagerAuthorizer builds an autorest.Authorizer for the Azure Resource Manager using the given credentials
func (auth *SDKAuth) GetResourceManagerAuthorizer() (autorest.Authorizer, error) {}

// GetSdkAuthFromString builds from the cmd flags a ServicePrincipal
// Deprecated: Use SDKAuth.FromString instead.
func GetSdkAuthFromString(credentials string) (SDKAuth, error) {}

// GetArmAuthorizerFromSdkAuth creates an ARM authorizer from an Sp
// Deprecated: Use SDKAuth.GetResourceManagerAuthorizer instead.
func GetArmAuthorizerFromSdkAuth(auth SDKAuth) (autorest.Authorizer, error) {}

// GetArmAuthorizerFromSdkAuthJSON creats am ARM authorizer from the passed sdk auth file
func GetArmAuthorizerFromSdkAuthJSON(path string, resourceManagerEndpoint string) (autorest.Authorizer, error) {}

// GetArmAuthorizerFromSdkAuthJSONString creates an ARM authorizer from the sdk auth credentials
func GetArmAuthorizerFromSdkAuthJSONString(credentials string, resourceManagerEndpoint string) (autorest.Authorizer, error) {}

// GetArmAuthorizerFromEnvironment creates an ARM authorizer from a MSI (e.g. AAD Pod Identity)
func GetArmAuthorizerFromEnvironment() (autorest.Authorizer, error) {}

// GetArmAuthorizerFromCLI creates an ARM authorizer from the local azure cli
func GetArmAuthorizerFromCLI(params cli.GetAccessTokenParams) (autorest.Authorizer, error) {}

Documentation

Overview

Package auth contains utilities for azure sdk authentication

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetArmAuthorizerFromCLI

func GetArmAuthorizerFromCLI(params cli.GetAccessTokenParams) (autorest.Authorizer, error)

GetArmAuthorizerFromCLI creates an ARM authorizer from the local azure cli

func GetArmAuthorizerFromEnvironment

func GetArmAuthorizerFromEnvironment() (autorest.Authorizer, error)

GetArmAuthorizerFromEnvironment creates an ARM authorizer from a MSI (e.g. AAD Pod Identity)

func GetArmAuthorizerFromSdkAuth

func GetArmAuthorizerFromSdkAuth(auth SDKAuth) (autorest.Authorizer, error)

GetArmAuthorizerFromSdkAuth creates an ARM authorizer from an Sp Deprecated: Use SDKAuth.GetResourceManagerAuthorizer instead.

func GetArmAuthorizerFromSdkAuthJSON

func GetArmAuthorizerFromSdkAuthJSON(path string, resourceManagerEndpoint string) (autorest.Authorizer, error)

GetArmAuthorizerFromSdkAuthJSON creats am ARM authorizer from the passed sdk auth file

func GetArmAuthorizerFromSdkAuthJSONString

func GetArmAuthorizerFromSdkAuthJSONString(credentials string, resourceManagerEndpoint string) (autorest.Authorizer, error)

GetArmAuthorizerFromSdkAuthJSONString creates an ARM authorizer from the sdk auth credentials

Types

type SDKAuth

type SDKAuth struct {
	ClientID       string `json:"clientId"`
	ClientSecret   string `json:"clientSecret"`
	SubscriptionID string `json:"subscriptionId"`
	TenantID       string `json:"tenantId"`
	ARMEndpointURL string `json:"resourceManagerEndpointUrl"`
	ADEndpointURL  string `json:"activeDirectoryEndpointUrl"`
}

SDKAuth represents an Azure AD Service Principal

func GetSdkAuthFromString

func GetSdkAuthFromString(credentials string) (SDKAuth, error)

GetSdkAuthFromString builds from the cmd flags a ServicePrincipal Deprecated: Use SDKAuth.FromString instead.

func (*SDKAuth) FromString

func (auth *SDKAuth) FromString(credentials string) error

FromString fills the struct with the information from the input json string

func (*SDKAuth) GetResourceManagerAuthorizer

func (auth *SDKAuth) GetResourceManagerAuthorizer() (autorest.Authorizer, error)

GetResourceManagerAuthorizer builds an autorest.Authorizer for the Azure Resource Manager using the given credentials

Jump to

Keyboard shortcuts

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