authorizer

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ARMTokenForBinding added in v0.1.5

func ARMTokenForBinding(ctx context.Context, spec msiacrpullv1beta2.AcrPullBindingSpec, tenantId, clientId, serviceAccountToken string) (azcore.AccessToken, error)

func AcquireARMToken added in v0.1.5

func AcquireARMToken(ctx context.Context, id azidentity.ManagedIDKind) (azcore.AccessToken, error)

func CreateACRDockerCfg

func CreateACRDockerCfg(acrFQDN string, accessToken azcore.AccessToken) (string, error)

CreateACRDockerCfg creates an ACR docker config using given access token.

func ExchangeACRAccessToken added in v0.1.5

func ExchangeACRAccessToken(ctx context.Context, armToken azcore.AccessToken, acrFQDN, scope string) (azcore.AccessToken, error)

ExchangeACRAccessToken exchanges an ARM access token to an ACR access token

func ExchangeACRAccessTokenForSpec added in v0.1.5

func ExchangeACRAccessTokenForSpec(ctx context.Context, armToken azcore.AccessToken, spec msiacrpullv1beta2.AcrConfiguration) (azcore.AccessToken, error)

Types

type Authorizer

type Authorizer struct{}

Authorizer is an instance of authorizer

func NewAuthorizer

func NewAuthorizer() *Authorizer

NewAuthorizer returns an authorizer

func (*Authorizer) AcquireACRAccessToken added in v0.1.5

func (az *Authorizer) AcquireACRAccessToken(ctx context.Context, identityResourceID, clientID, acrFQDN, scope string) (azcore.AccessToken, error)

AcquireACRAccessToken acquires ACR access token using managed identity resource or client ID.

type Interface

type Interface interface {
	AcquireACRAccessToken(ctx context.Context, identityResourceID, clientID, acrFQDN, scope string) (azcore.AccessToken, error)
}

Interface is the authorizer interface to acquire ACR access tokens.

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