identityserver4 - 身份服务器 4 错误 "keyset is missing"

标签 identityserver4

在我配置 EntityFramework 后,代码不起作用,我只是喜欢这个页面的文档 identity server 4 official doc

就像文档在最后一页所说的那样“您现在应该能够运行任何现有的客户端应用程序并登录、获取 token 和调用 API——所有这些都基于数据库配置。”。但是当我运行控制台应用程序时,我看到以下 error ,不管服务器信息看起来正常,这是discovery document .我确定我在客户端之前启动了服务器。我在 google 和 Stack Overflow 上找不到原因或相关的东西。我想知道“缺少 key 集”是什么意思,以及如何解决它。

最佳答案

您是否添加了以下内容?

public void ConfigureServices(IServiceCollection services)
{
    services.AddIdentityServer()
            .AddDeveloperSigningCredential()....
}

未添加时出现以下错误。
System.InvalidOperationException: Policy error while contacting the discovery endpoint http://localhost:5050/.well-known/openid-configuration: Keyset is missing
       at IdentityModel.AspNetCore.OAuth2Introspection.PostConfigureOAuth2IntrospectionOptions.<GetIntrospectionEndpointFromDiscoveryDocument>d__3.MoveNext() 

非常烦人,这从未被记录下来。

附言您必须在测试之前重新启动客户端。
客户端只调用一次发现。

关于identityserver4 - 身份服务器 4 错误 "keyset is missing",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47709265/

相关文章:

asp.net - OWIN 作为 IdentityServer4 的受众

c# - 请求 API 资源以外的范围时,ProfileDataRequestContext.RequestedClaimTypes 始终为 null?

IdentityServer4 仅适用于 HTTPS

.Net Core 2.1 与 IdentityServer4 Cookie 和基于 API JWT 的同一应用程序身份验证

java - WSO2 Get UserInfo 返回错误 java null 异常

angular - 使用 Angular SPA 应用程序与 IdentityServer4 通信以进行身份​​验证/授权接收 token ,然后与 Web API 通信

asp.net-core - Identity Server 4 和 ASP.NET Core 身份

c# - aspnet.core 使用 UserManager<IdentityUser> 播种数据

identityserver4 - 身份服务器 - 将自定义参数添加到来自 token 端点的 JSON 响应

identityserver4 - 方法 GetTokenAsync 不可用