internal static ICacheIdentityClient CreateForServicePrincipal()

in src/CacheIdentityClient.cs [48:56]


    internal static ICacheIdentityClient CreateForServicePrincipal(AzureCacheOptions options)
    {
        var clientApp = ConfidentialClientApplicationBuilder.Create(options.ClientId)
            .WithCloudAuthority(options)
            .WithCredentials(options)
            .Build();

        return new CacheIdentityClient(getToken: () => clientApp.AcquireTokenForClient(new[] { options.Scope }).ExecuteAsync());
    }