code: func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error) {
  	resp, err := cli.post(ctx, "/auth", url.Values{}, auth, nil)
  	defer ensureReaderClosed(resp)
  
  	if err != nil {
  		return registry.AuthenticateOKBody{}, err
  	}
  
  	var response registry.AuthenticateOKBody
  	err = json.NewDecoder(resp.body).Decode(&response)
  	return response, err
  }
docs: // RegistryLogin authenticates the docker server with a given docker registry.
  // It returns unauthorizedError when the authentication fails.