Tag: okta

使用JwtBearerAuthentication签名密钥

我正在尝试使用JwtBearerMiddleware在我的AspNetCore MVC应用程序(仅限Web API)中实现JWT承载身份validation,但我收到了带有标头的401响应: WWW-Authenticate: Bearer error=”invalid_token”, error_description=”The signature key was not found” Startup.cs中的相关代码如下所示: app.UseJwtBearerAuthentication(new JwtBearerOptions { Authority = “https://example.okta.com”, Audience = “myClientId” }); 使用权限URL,我希望中间件从https://example.okta.com/.well-known/openid-configuration查询我的身份提供程序元数据,以获取jwks_uri ,然后从https://example.okta.com/oauth2/v1/keys获取签名密钥https://example.okta.com/oauth2/v1/keys 。 我不认为这种情况正在发生。 我需要做些什么才能找到并使用签名密钥? 谢谢