cloudauth

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoLoader = errors.New("no loader found")

Functions

This section is empty.

Types

type AuthDirective

type AuthDirective struct {
	Service string
	Realm   string
}

func ChallengeLoginServer

func ChallengeLoginServer(ctx context.Context, loginServerURL string) (*AuthDirective, error)

type AuthLoader

type AuthLoader func(ctx context.Context, logger logr.Logger, server string) (*registry.AuthConfig, error)

type LoginChallenger added in v0.1.22

type LoginChallenger func(ctx context.Context, loginServerURL string) (*AuthDirective, error)

type Registry

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

func (*Registry) Register

func (r *Registry) Register(re *regexp.Regexp, loader AuthLoader)

Register will create a new url regex -> authorization loader scheme.

func (*Registry) RetrieveAuthorization

func (r *Registry) RetrieveAuthorization(
	ctx context.Context,
	logger logr.Logger,
	server string,
) (*registry.AuthConfig, error)

RetrieveAuthorization will multiplex registered auth loaders based on url pattern and use the appropriate one to make an authorization request. The returned value can be marshalled into the contents of a Docker config.json file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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