📌  相关文章
📜  System.InvalidOperationException:未找到名为“查看所有角色”的 AuthorizationPolicy. - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:39.028000             🧑  作者: Mango

代码示例1
services.AddAuthorization(o =>
{
    o.AddPolicy("FirstStepCompleted", policy => policy.RequireClaim("FirstStepCompleted"));
    o.AddPolicy("Authorized", policy => policy.RequireClaim("Authorized"));
});