authorizer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 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 ACRTokenExchanger

type ACRTokenExchanger interface {
	ExchangeACRAccessToken(armToken types.AccessToken, acrFQDN string) (types.AccessToken, error)
}

ACRTokenExchanger is the interface to exchange an ACR access token.

type ManagedIdentityTokenRetriever

type ManagedIdentityTokenRetriever interface {
	AcquireARMToken(clientID string, resourceID string) (types.AccessToken, error)
}

ManagedIdentityTokenRetriever is the interface to acquire an ARM access token.

type TokenExchanger

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

TokenExchanger is an instance of ACRTokenExchanger

func NewTokenExchanger

func NewTokenExchanger() *TokenExchanger

NewTokenExchanger returns a new token exchanger

func (*TokenExchanger) ExchangeACRAccessToken

func (te *TokenExchanger) ExchangeACRAccessToken(armToken types.AccessToken, acrFQDN string) (types.AccessToken, error)

ExchangeACRAccessToken exchanges an ARM access token to an ACR access token

type TokenRetriever

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

TokenRetriever is an instance of ManagedIdentityTokenRetriever

func NewTokenRetriever

func NewTokenRetriever(activeDirectoryEndpoint string, resourceManagerEndpoint string) *TokenRetriever

NewTokenRetriever returns a new token retriever

func (*TokenRetriever) AcquireARMTokenMSI

func (tr *TokenRetriever) AcquireARMTokenMSI(ctx context.Context, clientID string) (types.AccessToken, error)

AcquireARMTokenMSI acquires the managed identity ARM access token

func (*TokenRetriever) AcquireARMTokenSP

func (tr *TokenRetriever) AcquireARMTokenSP(ctx context.Context, clientID, clientSecret, tenantID string) (types.AccessToken, error)

AcquireARMTokenSP acquires the service principal ARM access token

Directories

Path Synopsis
Package mock_authorizer is a generated GoMock package.
Package mock_authorizer is a generated GoMock package.

Jump to

Keyboard shortcuts

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