我需要在身份服务器客户端上执行哪些 JWT 验证?
What JWT validation do I need to do on an Identity Server Client?
我在 Startup.cs
中这样配置了我的身份服务器客户端
app.UseJwtBearerAuthentication(options =>
{
options.Authority = Configuration["Urls:IdentityServer"];
options.RequireHttpsMetadata = false;
options.Audience = Configuration["Urls:IdentityServer"] + "/resources";
options.AutomaticAuthenticate = true;
}
这会采用所有推荐的 JWT 验证(签名、随机数等)还是我必须自己编写任何验证?
您应该要求对生产中的元数据使用 HTTPS。
除了 JWT 中间件,您还需要进行范围验证。
我在 Startup.cs
中这样配置了我的身份服务器客户端app.UseJwtBearerAuthentication(options =>
{
options.Authority = Configuration["Urls:IdentityServer"];
options.RequireHttpsMetadata = false;
options.Audience = Configuration["Urls:IdentityServer"] + "/resources";
options.AutomaticAuthenticate = true;
}
这会采用所有推荐的 JWT 验证(签名、随机数等)还是我必须自己编写任何验证?
您应该要求对生产中的元数据使用 HTTPS。
除了 JWT 中间件,您还需要进行范围验证。