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

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.
主站蜘蛛池模板: 淅川县| 玉屏| 科尔| 灵川县| 滨海县| 揭东县| 临海市| 海林市| 巨鹿县| 霍邱县| 临湘市| 体育| 广宗县| 玉山县| 长白| 金乡县| 基隆市| 尚义县| 枣阳市| 新营市| 民丰县| 通河县| 牙克石市| 娄烦县| 怀来县| 华蓥市| 黄龙县| 临沭县| 唐河县| 方正县| 乳山市| 镇原县| 德令哈市| 汶川县| 华宁县| 泊头市| 临城县| 谢通门县| 兴隆县| 门头沟区| 杨浦区|