def on_request(self, request: PipelineRequest[HTTPRequestType]) -> None:
        """Called before the policy sends a request.

        The base implementation authorizes the request with a bearer token.

        :param ~azure.core.pipeline.PipelineRequest request: the request
        """
        self._enforce_https(request)

        if self._token is None or self._need_new_token:
            if self._enable_cae:
                self._token = self._credential.get_token(*self._scopes, enable_cae=self._enable_cae)
            else:
                self._token = self._credential.get_token(*self._scopes)
        self._update_headers(request.http_request.headers, self._token.token)
Called before the policy sends a request.

        The base implementation authorizes the request with a bearer token.

        :param ~azure.core.pipeline.PipelineRequest request: the request
        
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/core/pipeline/policies/_authentication.py