Documentation ¶
Index ¶
Constants ¶
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.