- ASP.NET Web API Security Essentials
- Rajesh Gunasundaram
- 72字
- 2021-07-30 10:15:54
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
: BothAuthorizeAttribute
andAuthorizationFilterAttribute
implementIAuthorizationFilter
.IAuthorizationFilter
is to be implemented if advanced authorization logic is required.
推薦閱讀
- Visual FoxPro程序設計教程(第3版)
- PHP 從入門到項目實踐(超值版)
- 單片機C語言程序設計實訓100例:基于STC8051+Proteus仿真與實戰
- Python爬蟲開發:從入門到實戰(微課版)
- 程序員修煉之道:通向務實的最高境界(第2版)
- 劍指MySQL:架構、調優與運維
- JavaCAPS基礎、應用與案例
- Python期貨量化交易實戰
- Mastering Elixir
- Exploring SE for Android
- ASP.NET Web API Security Essentials
- Implementing DevOps with Ansible 2
- Java入門經典
- 網頁設計理論與實踐
- 梔子貓的奇幻編程之旅:21天探索信息學奧賽C++編程