def METHOD_NAME(self, request: PipelineRequest) -> None:
    _enforce_tls(request)
    challenge = ChallengeCache.get_challenge_for_url(request.http_request.url)
    if challenge:
        # Note that if the vault has moved to a new tenant since our last request for it, this request will fail.
        if self._need_new_token:
            # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource
            scope = challenge.get_scope() or challenge.get_resource() + "/.default"
            self._token = self._credential.get_token(scope, tenant_id=challenge.tenant_id)
        # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token
        request.http_request.headers["Authorization"] = f"Bearer {self._token.token}"  # type: ignore
        return
    # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data,
    # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge.
    # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell
    # super to send it again.
    if request.http_request.body:
        request.context["key_vault_request_data"] = request.http_request.body
        request.http_request.set_json_body(None)
        request.http_request.headers["Content-Length"] = "0"