sdk

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthTokenProvider

func GetAuthTokenProvider(ctx context.Context, d *schema.ResourceData, azIdentityFuncs IdentityFuncsI) (func() (string, error), error)

func NewDynamicAuthorizationConnection

func NewDynamicAuthorizationConnection(organizationUrl string, authProvider func() (string, error)) (*azuredevops.Connection, error)

Creates a new Azure DevOps connection instance using a function that returns an authorization header string.

Types

type AzIdentityFuncsImpl

type AzIdentityFuncsImpl struct{}

func (AzIdentityFuncsImpl) NewClientAssertionCredential

func (a AzIdentityFuncsImpl) NewClientAssertionCredential(tenantID, clientID string, getAssertion func(context.Context) (string, error), options *azidentity.ClientAssertionCredentialOptions) (TokenGetter, error)

func (AzIdentityFuncsImpl) NewClientCertificateCredential

func (a AzIdentityFuncsImpl) NewClientCertificateCredential(tenantID string, clientID string, certs []*x509.Certificate, key crypto.PrivateKey, options *azidentity.ClientCertificateCredentialOptions) (TokenGetter, error)

func (AzIdentityFuncsImpl) NewClientSecretCredential

func (a AzIdentityFuncsImpl) NewClientSecretCredential(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions) (TokenGetter, error)

func (AzIdentityFuncsImpl) NewManagedIdentityCredential

func (a AzIdentityFuncsImpl) NewManagedIdentityCredential(options *azidentity.ManagedIdentityCredentialOptions) (TokenGetter, error)

type AzTokenProvider

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

func (*AzTokenProvider) GetToken

func (provider *AzTokenProvider) GetToken() (string, error)

type GHIdTokenResponse

type GHIdTokenResponse struct {
	Value string `json:"value"`
}

type HCPWorkloadToken

type HCPWorkloadToken struct {
	RunPhase string `json:"terraform_run_phase"`
}

type IdentityFuncsI

type IdentityFuncsI interface {
	NewClientAssertionCredential(tenantID, clientID string, getAssertion func(context.Context) (string, error), options *azidentity.ClientAssertionCredentialOptions) (TokenGetter, error)
	NewClientCertificateCredential(tenantID string, clientID string, certs []*x509.Certificate, key crypto.PrivateKey, options *azidentity.ClientCertificateCredentialOptions) (TokenGetter, error)
	NewClientSecretCredential(tenantID string, clientID string, clientSecret string, options *azidentity.ClientSecretCredentialOptions) (TokenGetter, error)
	NewManagedIdentityCredential(options *azidentity.ManagedIdentityCredentialOptions) (TokenGetter, error)
}

type OIDCCredentialProvder

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

func (*OIDCCredentialProvder) GetToken

type TokenGetter

type TokenGetter interface {
	GetToken(ctx context.Context, opts policy.TokenRequestOptions) (azcore.AccessToken, error)
}

Jump to

Keyboard shortcuts

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