之前的角色授权是在代码中把角色定义死了;更希望能够自己来完成校验逻辑; 第一步:增加CustomAuthorizationHandler-----专用做检验逻辑的; 要求继承自 AuthorizationHandler<> 泛型抽象类; public class CustomAuthorizationHandler :AuthorizationHandler<CustomAuthorizationRequirement>