code: func DecodeBasicAuthHeader(header string) (string, string, error) {
  	var code string
  	parts := strings.SplitN(header, " ", 2)
  	if len(parts) == 2 && parts[0] == "Basic" {
  		code = parts[1]
  	}
  
  	decoded, err := base64.StdEncoding.DecodeString(code)
  	if err != nil {
  		return "", "", err
  	}
  
  	userAndPass := strings.SplitN(string(decoded), ":", 2)
  	if len(userAndPass) != 2 {
  		return "", "", errors.New("Invalid basic auth header")
  	}
  
  	return userAndPass[0], userAndPass[1], nil
  }
docs: // DecodeBasicAuthHeader decodes user and password from a basic auth header.