auth

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AuthHeader = "X-Registry-Auth"

AuthHeader is the name of the header used to send encoded registry authorization credentials for registry operations (push/pull).

Variables

This section is empty.

Functions

func DecodeAuthConfig

func DecodeAuthConfig(authEncoded string) (*dockertypes.AuthConfig, error)

DecodeAuthConfig decodes base64url encoded (RFC4648, section 5) JSON authentication information as sent through the X-Registry-Auth header.

This function always returns an AuthConfig, even if an error occurs. It is up to the caller to decide if authentication is required, and if the error can be ignored.

For details on base64url encoding, see: - RFC4648, section 5: https://tools.ietf.org/html/rfc4648#section-5

func DecodeAuthConfigBody

func DecodeAuthConfigBody(rdr io.ReadCloser) (*dockertypes.AuthConfig, error)

DecodeAuthConfigBody decodes authentication information as sent as JSON in the body of a request. This function is to provide backward compatibility with old clients and API versions. Current clients and API versions expect authentication to be provided through the X-Registry-Auth header.

Like DecodeAuthConfig, this function always returns an AuthConfig, even if an error occurs. It is up to the caller to decide if authentication is required, and if the error can be ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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