auth

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 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, img string) (*url.URL, error)

GetAuthURL from the instructions in the challenge

func GetBearerHeader

func GetBearerHeader(challenge string, img string, 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(img string) (url.URL, error)

GetChallengeURL creates a URL object based on the image info

func GetScopeFromImageName added in v1.1.1

func GetScopeFromImageName(img, svc string) string

GetScopeFromImageName normalizes an image name for use as scope during auth and head requests

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