aztokenprovider

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessToken

type AccessToken struct {
	Token     string
	ExpiresOn time.Time
}

type AzureTokenProvider

type AzureTokenProvider interface {
	GetAccessToken(ctx context.Context, scopes []string) (string, error)
}

func NewAzureAccessTokenProvider

func NewAzureAccessTokenProvider(settings *azsettings.AzureSettings, credentials azcredentials.AzureCredentials,
	userIdentitySupported bool) (AzureTokenProvider, error)

type ConcurrentTokenCache

type ConcurrentTokenCache interface {
	GetAccessToken(ctx context.Context, tokenRetriever TokenRetriever, scopes []string) (string, error)
}

func NewConcurrentTokenCache

func NewConcurrentTokenCache() ConcurrentTokenCache

type TokenClient added in v1.7.0

type TokenClient interface {
	FromClientSecret(ctx context.Context, scopes []string) (*AccessToken, error)
	FromRefreshToken(ctx context.Context, refreshToken string, scopes []string) (*AccessToken, error)
	OnBehalfOf(ctx context.Context, idToken string, scopes []string) (*AccessToken, error)
	FromUsername(ctx context.Context, username string, scopes []string) (*AccessToken, error)
}

func NewTokenClient added in v1.7.0

func NewTokenClient(endpointUrl string, clientId string, clientSecret string, httpClient *http.Client) (TokenClient, error)

type TokenRetriever

type TokenRetriever interface {
	GetCacheKey(grafanaMultiTenantId string) string
	Init() error
	GetAccessToken(ctx context.Context, scopes []string) (*AccessToken, error)
}

Jump to

Keyboard shortcuts

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