authutils

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Overview

authutils contains utility functions that import both the core auth package and the provider packages i.e. functions that cannot be placed in the core package because they would cause a cyclic dependency (the provider packages also import the core package).

Index

Constants

This section is empty.

Variables

View Source
var ErrProviderDoesNotSupportRegistry = errors.New("provider does not support registry authentication")

ErrProviderDoesNotSupportRegistry is returned when the provider does not support registry authentication.

Functions

func GetArtifactRegistryCredentials

func GetArtifactRegistryCredentials(ctx context.Context,
	providerName, artifactRepository string,
	opts ...auth.Option) (authn.Authenticator, error)

GetArtifactRegistryCredentials retrieves the credentials for the specified artifact repository using the specified provider. It returns an authn.Authenticator that can be used to authenticate with the registry.

func ProviderByName

func ProviderByName(name string) auth.Provider

ProviderByName looks up the implemented providers by name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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