cloudauth

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 7 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, server string) (*types.AuthConfig, 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, server string) (*types.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