tokenprovider

package
v0.0.0-...-a1c22f6 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOAuthToken

func GetOAuthToken(ctx context.Context, spt *adal.ServicePrincipalToken) (string, error)

Types

type MsiTokenProvider

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

func NewMsiTokenProvider

func NewMsiTokenProvider(resourceID string) (*MsiTokenProvider, error)

func (*MsiTokenProvider) GetToken

func (m *MsiTokenProvider) GetToken(resource string) (*adal.ServicePrincipalToken, error)

type ProviderOptions

type ProviderOptions struct {
	TenantID     string
	ClientID     string
	ClientSecret datastructs.RedactedString
	CloudName    string
}

type ServicePrincipalTokenProvider

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

func NewServicePrincipalTokenProvider

func NewServicePrincipalTokenProvider(tenantID string, clientID string,
	clientSecret datastructs.RedactedString, aadEndpoint string) (*ServicePrincipalTokenProvider, error)

func NewServicePrincipalTokenProviderWithOptions

func NewServicePrincipalTokenProviderWithOptions(o *ProviderOptions) (*ServicePrincipalTokenProvider, error)

func (*ServicePrincipalTokenProvider) GetToken

type TokenProvider

type TokenProvider interface {
	GetToken(resource string) (*adal.ServicePrincipalToken, error)
}

Jump to

Keyboard shortcuts

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