- 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.
推薦閱讀
- 大學計算機基礎(第二版)
- 垃圾回收的算法與實現
- MySQL數據庫應用與管理 第2版
- PHP基礎案例教程
- 微服務從小白到專家:Spring Cloud和Kubernetes實戰(zhàn)
- HTML5+CSS3 Web前端開發(fā)技術(第2版)
- Instant PHP Web Scraping
- 打開Go語言之門:入門、實戰(zhàn)與進階
- Orleans:構建高性能分布式Actor服務
- Python大規(guī)模機器學習
- Scrapy網絡爬蟲實戰(zhàn)
- 從零開始學Python大數據與量化交易
- Android嵌入式系統(tǒng)程序開發(fā)(基于Cortex-A8)
- Three.js Essentials
- 計算機軟件項目實訓指導