azureauth

package
v0.0.0-...-035f276 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearerAuthorizerTokenProvider

type BearerAuthorizerTokenProvider struct {
	// contains filtered or unexported fields
}

TODO add testing for this struct..(How?)

func NewBearerAuthorizerTokenProvider

func NewBearerAuthorizerTokenProvider(bearerAuthorizer IBearerAuthorizer) *BearerAuthorizerTokenProvider

func (*BearerAuthorizerTokenProvider) GetOAuthToken

func (provider *BearerAuthorizerTokenProvider) GetOAuthToken(ctx context.Context) (string, error)

GetOAuthToken receives context and provides an OAuthToken based on bearer token The function Checks if the token needs to be refreshed before returning it.

type IAzureAuthorizerFactory

type IAzureAuthorizerFactory interface {
	// CreateARMAuthorizer Generates a new ARM azure client authorizer
	CreateARMAuthorizer() (autorest.Authorizer, error)
}

IAzureAuthorizerFactory Factory to create an azure authorizer

type IBearerAuthorizer

type IBearerAuthorizer interface {
	// TokenProvider is the provider for getting a token
	TokenProvider() adal.OAuthTokenProvider
}

IBearerAuthorizer is a bearer token based authorizer

type IBearerAuthorizerTokenProvider

type IBearerAuthorizerTokenProvider interface {
	// GetOAuthToken receives context and provides an OAuthToken based on bearer token
	// The function Checks if the token needs to be refreshed before returning it.
	GetOAuthToken(ctx context.Context) (string, error)
}

type MSIAzureAuthorizerConfiguration

type MSIAzureAuthorizerConfiguration struct {
	// MSI client id
	MSIClientId string
}

MSIAzureAuthorizerConfiguration Factory configuration to create an azure authorizer from environment (env variables or managed identity)

type MSIAzureAuthorizerFactory

type MSIAzureAuthorizerFactory struct {
	// contains filtered or unexported fields
}

MSIAzureAuthorizerFactory Factory to create an azure authorizer using managed identity implements azureauth.IAzureAuthorizerFactory

func NewMSIEnvAzureAuthorizerFactory

func NewMSIEnvAzureAuthorizerFactory(instrumentationProvider instrumentation.IInstrumentationProvider, configuration *MSIAzureAuthorizerConfiguration, authWrapper wrappers.IAzureAuthWrapper) *MSIAzureAuthorizerFactory

NewMSIEnvAzureAuthorizerFactory Constructor for MSIAzureAuthorizerFactory

func (*MSIAzureAuthorizerFactory) CreateARMAuthorizer

func (factory *MSIAzureAuthorizerFactory) CreateARMAuthorizer() (autorest.Authorizer, error)

CreateARMAuthorizer Generates a new ARM azure client authorizer using MSI configured

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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