官术网_书友最值得收藏!

Custom authorization filters

To implement a custom authorization filter, we need to create a class that derives either AuthorizeAttribute, AuthorizationFilterAttribute, or IAuthorizationFilter.

  • AuthorizeAttribute: An action is authorized based on the current user and the user's roles.
  • AuthorizationFilterAttribute: Synchronous authorization logic is applied and it may not be based on the current user or role.
  • IAuthorizationFilter: Both AuthorizeAttribute and AuthorizationFilterAttribute implement IAuthorizationFilter. IAuthorizationFilter is to be implemented if advanced authorization logic is required.
主站蜘蛛池模板: 分宜县| 仪征市| 沙雅县| 鄂托克旗| 汝州市| 应城市| 枣阳市| 珠海市| 乌鲁木齐市| 奉化市| 绵阳市| 兴国县| 靖边县| 柞水县| 山东| 朝阳县| 丹江口市| 曲阜市| 台南市| 阳东县| 五寨县| 东平县| 启东市| 临洮县| 霍邱县| 八宿县| 吉安市| 禄丰县| 胶州市| 泰兴市| 清新县| 杂多县| 濮阳县| 八宿县| 房山区| 开鲁县| 旬阳县| 右玉县| 祁东县| 铁岭市| 澎湖县|