def METHOD_NAME(conf) -> Dict[str, str]:
    """Format a macaroon and its associated discharge.
    :return: A string suitable to use in an Authorization header.
    """
    host = parse_url(os.getenv("UBUNTU_ONE_SSO_URL", constants.UBUNTU_ONE_SSO_URL)).host
    try:
        root_macaroon_raw = conf.get(host, "macaroon")
        unbound_raw = conf.get(host, "unbound_discharge")
    except (configparser.NoOptionError, configparser.NoSectionError) as conf_error:
        raise errors.LegacyCredentialsParseError(str(conf_error)) from conf_error
    return {"r": root_macaroon_raw, "d": unbound_raw}