在我配置 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/