auth

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2025 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 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 ChallengeHeader = "WWW-Authenticate"

ChallengeHeader is the HTTP Header containing challenge instructions

Variables

This section is empty.

Functions

func GetAuthURL

func GetAuthURL(challenge string, imageRef ref.Named) (*url.URL, error)

GetAuthURL from the instructions in the challenge

func GetBearerHeader

func GetBearerHeader(challenge string, imageRef ref.Named, registryAuth string) (string, error)

GetBearerHeader tries to fetch a bearer token from the registry based on the challenge instructions

func GetChallengeRequest

func GetChallengeRequest(URL url.URL) (*http.Request, error)

GetChallengeRequest creates a request for getting challenge instructions

func GetChallengeURL

func GetChallengeURL(imageRef ref.Named) url.URL

GetChallengeURL returns the URL to check auth requirements for access to a given image

func GetToken

func GetToken(container types.Container, registryAuth string) (string, error)

GetToken fetches a token for the registry hosting the provided image

Types

This section is empty.

Jump to

Keyboard shortcuts

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