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

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.
主站蜘蛛池模板: 麻城市| 收藏| 福建省| 凤山县| 江安县| 兰坪| 靖宇县| 桓仁| 永寿县| 南郑县| 津市市| 鞍山市| 海兴县| 综艺| 盐津县| 嘉定区| 鄂尔多斯市| 黔南| 鲁山县| 元氏县| 永兴县| 屏东市| 资溪县| 泸州市| 临夏县| 平遥县| 黄浦区| 龙游县| 荔波县| 张掖市| 手机| 信宜市| 渝北区| 城固县| 邻水| 汉川市| 常宁市| 新宁县| 临朐县| 武城县| 六安市|