- 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.
推薦閱讀
- 軟件安全技術
- .NET之美:.NET關鍵技術深入解析
- Node.js 10實戰
- Building a Home Security System with Raspberry Pi
- 深入理解Django:框架內幕與實現原理
- 認識編程:以Python語言講透編程的本質
- Django:Web Development with Python
- TypeScript實戰指南
- HTML5 and CSS3 Transition,Transformation,and Animation
- Java程序員面試筆試寶典(第2版)
- Instant Debian:Build a Web Server
- Java并發編程之美
- Python從入門到精通(第3版)
- 單片機原理及應用技術
- Learning Android Application Testing