- 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.
推薦閱讀
- 數(shù)據(jù)庫(kù)系統(tǒng)原理及MySQL應(yīng)用教程(第2版)
- UI圖標(biāo)創(chuàng)意設(shè)計(jì)
- Java EE 6 企業(yè)級(jí)應(yīng)用開(kāi)發(fā)教程
- ANSYS Fluent 二次開(kāi)發(fā)指南
- SQL基礎(chǔ)教程(第2版)
- 批調(diào)度與網(wǎng)絡(luò)問(wèn)題的組合算法
- Android Wear Projects
- Swift 4從零到精通iOS開(kāi)發(fā)
- Web App Testing Using Knockout.JS
- Learning VMware vSphere
- UI設(shè)計(jì)基礎(chǔ)培訓(xùn)教程(全彩版)
- iOS開(kāi)發(fā)項(xiàng)目化入門(mén)教程
- 你真的會(huì)寫(xiě)代碼嗎
- Clojure Web Development Essentials
- Ubuntu Server Cookbook