Asp.net-Core
IdentityServer4 v2.3.2 中的 AddConfigurationStore 和 AddOperationalStore 在哪裡
所以我根據identityserver.io的 quickstart 創建了一個項目,我按照教程做了所有的事情。但我沒有
添加配置儲存
添加OperationalStore
在
services.AddIdentityServer
有誰能夠幫助我 ?
值得一提的是,它們在 IdentityServer4 v2.2.0 和 IdentityServer 發布頁面中可用,我沒有看到任何關於此更改的資訊。
這是我的配置程式碼:
var builder = services.AddIdentityServer(options => { options.Events.RaiseErrorEvents = true; options.Events.RaiseInformationEvents = true; options.Events.RaiseFailureEvents = true; options.Events.RaiseSuccessEvents = true; }) .AddInMemoryIdentityResources(Config.GetIdentityResources()) .AddInMemoryApiResources(Config.GetApis()) .AddInMemoryClients(Config.GetClients()) .AddAspNetIdentity<ApplicationUser>();
AddConfigurationStore並且AddOperationalStore是Microsoft.Extensions.DependencyInjection命名空間中的擴展,但位於IdentityServer4.EntityFramework程序集中。您必須將
IdentityServer4.EntityFrameworkNuGet 包添加到您的項目中。
看起來您可能需要確保使用 IdentityServer4.EntityFramework 的 4.0.0 版本