共用方式為


MsalDistributedTokenCacheAdapter Constructor

Definition

Initializes a new instance of the MsalDistributedTokenCacheAdapter class.

public MsalDistributedTokenCacheAdapter (Microsoft.Extensions.Caching.Distributed.IDistributedCache distributedCache, Microsoft.Extensions.Options.IOptions<Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapterOptions> distributedCacheOptions, Microsoft.Extensions.Logging.ILogger<Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapter> logger, IServiceProvider? serviceProvider = default);
new Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapter : Microsoft.Extensions.Caching.Distributed.IDistributedCache * Microsoft.Extensions.Options.IOptions<Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapterOptions> * Microsoft.Extensions.Logging.ILogger<Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapter> * IServiceProvider -> Microsoft.Identity.Web.TokenCacheProviders.Distributed.MsalDistributedTokenCacheAdapter
Public Sub New (distributedCache As IDistributedCache, distributedCacheOptions As IOptions(Of MsalDistributedTokenCacheAdapterOptions), logger As ILogger(Of MsalDistributedTokenCacheAdapter), Optional serviceProvider As IServiceProvider = Nothing)

Parameters

distributedCache
IDistributedCache

Distributed cache instance to use.

distributedCacheOptions
IOptions<MsalDistributedTokenCacheAdapterOptions>

Options for the token cache.

logger
ILogger<MsalDistributedTokenCacheAdapter>

MsalDistributedTokenCacheAdapter logger.

serviceProvider
IServiceProvider

Service provider. Can be null, in which case the token cache will not be encrypted. See https://aka.ms/ms-id-web/token-cache-encryption.

Applies to