AuthorizeFilter 添加 AuthorizationPolicy 的代码如下:
services.AddMvc(o => { var policy = new AuthorizationPolicyBuilder() .RequireRole(ROLE_NAME) .Build(); o.Filters.Add(new AuthorizeFilter(policy)); });
请问如何通过 IAuthorizationPolicyProvider 接口获取上面添加的 AuthorizationPolicy ?
莫回无