Links to videos talking about
JWT Basics: • JWT Authentication in ASP.NET Core We...
Role Based Access Control: • JWT Token with RBAC(Role-Based Access...
🏗️ Source Code: https://github.com/xiaomi7732/JWTAuth...
For more videos like this:
💡Subscribe: https://www.youtube.com/c/CodewithSaa...
Policy based authorization is another authorization method provided by ASP.NET Core WebAPI. It is more flexible than the Role Based Access Control (RBAC), but it requires more code.
This video shows you how to create 1 authorization policy to make an example of how to implement it.
There are 4 essential parts:
1. Requirement
2. Policy
3. Authorization Handler
4. Policy enforcement
The video shows these in a slightly different order:
00:00 Introduction
00:46 How to enforace a policy
01:32 How to create a policy
02:48 How to create a requirement
03:52 How to create an authorization handler
06:04 Policy based authorization in action
08:02 Recap