语言

MicrosoftIdentityAppCallsWebApiAuthenticationBuilder.AddInMemoryTokenCaches 方法

定义

如果尚未添加其他 IMsalTokenCacheProvider 实现,则添加内存令牌缓存。

public Microsoft.Identity.Web.MicrosoftIdentityAppCallsWebApiAuthenticationBuilder AddInMemoryTokenCaches(Action<Microsoft.Identity.Web.TokenCacheProviders.InMemory.MsalMemoryTokenCacheOptions>? configureOptions = default, Action<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions>? memoryCacheOptions = default);
member this.AddInMemoryTokenCaches : Action<Microsoft.Identity.Web.TokenCacheProviders.InMemory.MsalMemoryTokenCacheOptions> * Action<Microsoft.Extensions.Caching.Memory.MemoryCacheOptions> -> Microsoft.Identity.Web.MicrosoftIdentityAppCallsWebApiAuthenticationBuilder
Public Function AddInMemoryTokenCaches (Optional configureOptions As Action(Of MsalMemoryTokenCacheOptions) = Nothing, Optional memoryCacheOptions As Action(Of MemoryCacheOptions) = Nothing) As MicrosoftIdentityAppCallsWebApiAuthenticationBuilder

参数

memoryCacheOptions
Action<MemoryCacheOptions>

MemoryCacheOptions 要配置。

返回

服务集合。

适用于