authprovider

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 36 Imported by: 168 modules, 138 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DockerHubConfigfileKey = "https://index.docker.io/v1/"
	DockerHubRegistryHost  = "registry-1.docker.io"
)

Variables

This section is empty.

Functions

func NewDockerAuthProvider

func NewDockerAuthProvider(cfg DockerAuthProviderConfig) session.Attachable

Types

type AuthConfigProvider added in v0.27.0

type AuthConfigProvider func(ctx context.Context, host string, scope []string, cacheCheck ExpireCachedAuthCheck) (types.AuthConfig, error)

func LoadAuthConfig added in v0.27.0

func LoadAuthConfig(config *configfile.ConfigFile) AuthConfigProvider

type AuthTLSConfig added in v0.13.0

type AuthTLSConfig struct {
	RootCAs  []string
	Insecure bool
	KeyPairs []TLSKeyPair
}

type DockerAuthProviderConfig added in v0.20.0

type DockerAuthProviderConfig struct {
	// AuthConfigProvider is a function that provides auth config for a given host and scope
	AuthConfigProvider AuthConfigProvider
	// TLSConfigs is a map of host to TLS config
	TLSConfigs map[string]*AuthTLSConfig
	// ExpireCachedAuth is a function that returns true auth config should be refreshed
	// instead of using a pre-cached result.
	// If nil then the cached result will expire after 4 minutes and 50 seconds.
	// The function is called with the time the cached auth config was created
	// and the server URL the auth config is for.
	ExpireCachedAuth ExpireCachedAuthCheck
}

type ExpireCachedAuthCheck added in v0.27.0

type ExpireCachedAuthCheck func(created time.Time, serverURL string) bool

type TLSKeyPair added in v0.13.0

type TLSKeyPair struct {
	Key         string
	Certificate string
}

Jump to

Keyboard shortcuts

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