authconfig

package
v0.0.0-...-9c0042a Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(authEncoded string) (*registry.AuthConfig, error)

Decode 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.

func DecodeRequestBody

func DecodeRequestBody(r io.ReadCloser) (*registry.AuthConfig, error)

DecodeRequestBody 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 Decode, 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.

func Encode

func Encode(authConfig registry.AuthConfig) (string, error)

Encode serializes the auth configuration as a base64url encoded (RFC4648, section 5) JSON string for sending through the X-Registry-Auth header.

Types

This section is empty.

Jump to

Keyboard shortcuts

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