def METHOD_NAME(self, uri: str) -> str:  # pylint:disable=bad-option-value,useless-option-value,no-self-use
    """Extracts the host authority from the given URI.
    :param str uri: The URI of the HTTP request that prompted the challenge.
    :returns: The challenge host authority.
    :rtype: str
    """
    if not uri:
        raise ValueError("request_uri cannot be empty")
    parsed = parse.urlparse(uri)
    if not parsed.netloc:
        raise ValueError("request_uri must be an absolute URI")
    if parsed.scheme.lower() not in ["http", "https"]:
        raise ValueError("request_uri must be HTTP or HTTPS")
    return parsed.netloc