authn

package
v0.0.0-...-0cfc503 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package authn defines different methods of authentication for talking to a container registry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	// Authorization returns the value to use in an http transport's Authorization header.
	Authorization() (string, error)
}

Authenticator is used to authenticate Docker transports.

var Anonymous Authenticator = &anonymous{}

Anonymous is a singleton Authenticator for providing anonymous auth.

type Basic

type Basic struct {
	Username string
	Password string
}

Basic implements Authenticator for basic authentication.

func (*Basic) Authorization

func (b *Basic) Authorization() (string, error)

Authorization implements Authenticator.

type Bearer

type Bearer struct {
	Token string `json:"token"`
}

Bearer implements Authenticator for bearer authentication.

func (*Bearer) Authorization

func (b *Bearer) Authorization() (string, error)

Authorization implements Authenticator.

type Keychain

type Keychain interface {
	// Resolve looks up the most appropriate credential for the specified registry.
	Resolve(name.Registry) (Authenticator, error)
}

Keychain is an interface for resolving an image reference to a credential.

var (

	// Export an instance of the default keychain.
	DefaultKeychain Keychain = &defaultKeychain{}
)

There are a variety of ways a domain may get qualified within the Docker credential file. We enumerate them here as format strings.

func NewMultiKeychain

func NewMultiKeychain(kcs ...Keychain) Keychain

NewMultiKeychain composes a list of keychains into one new keychain.

Directories

Path Synopsis
Package k8schain exposes an implementation of the authn.Keychain interface based on the semantics the Kubelet follows when pulling the images for a Pod in Kubernetes.
Package k8schain exposes an implementation of the authn.Keychain interface based on the semantics the Kubelet follows when pulling the images for a Pod in Kubernetes.

Jump to

Keyboard shortcuts

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