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.