def get_bearer_token_provider(credential: AsyncTokenCredential, *scopes: str) -> Callable[[], Coroutine[Any, Any, str]]:
    """Returns a callable that provides a bearer token.

    It can be used for instance to write code like:

    .. code-block:: python

        from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider

        credential = DefaultAzureCredential()
        bearer_token_provider = get_bearer_token_provider(credential, "https://cognitiveservices.azure.com/.default")


        # Usage
        request.headers["Authorization"] = "Bearer " + await bearer_token_provider()

    :param credential: The credential used to authenticate the request.
    :type credential: ~azure.core.credentials_async.AsyncTokenCredential
    :param str scopes: The scopes required for the bearer token.
    :rtype: coroutine
    :return: A coroutine that returns a bearer token.
    """

    policy = AsyncBearerTokenCredentialPolicy(credential, *scopes)

    async def wrapper() -> str:
        request = _make_request()
        await policy.on_request(request)
        return request.http_request.headers["Authorization"][len("Bearer ") :]

    return wrapper
Returns a callable that provides a bearer token.

    It can be used for instance to write code like:

    .. code-block:: python

        from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider

        credential = DefaultAzureCredential()
        bearer_token_provider = get_bearer_token_provider(credential, "https://cognitiveservices.azure.com/.default")


        # Usage
        request.headers["Authorization"] = "Bearer " + await bearer_token_provider()

    :param credential: The credential used to authenticate the request.
    :type credential: ~azure.core.credentials_async.AsyncTokenCredential
    :param str scopes: The scopes required for the bearer token.
    :rtype: coroutine
    :return: A coroutine that returns a bearer token.
    
Solutions/CyberArkAudit/Data Connectors/.python_packages/lib/site-packages/azure/identity/aio/_bearer_token_provider.py