auth

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

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