Introduce how to do RBAC with JWT token in ASP.NET Core WebAPI for some real life application scenarios:
00:00 What is RBAC (Role based access control)
01:14 Protect resource to allow only a specific role
02:56 Adding role info to JWT token
04:12 Customize payload name for role info on JWT
05:01 Setup TokenValidationParameter to recognize alternative names for roles from the access token
06:17 Real scenario: allows a resource accessed by multiple roles
07:15 Real scenario: assigns multiple roles to a user
For more videos like this:
💡Subscribe: https://www.youtube.com/c/CodewithSaa...
Source code FYI:
🏗️ Example I: https://github.com/xiaomi7732/JWTAuth...
Example II: https://github.com/xiaomi7732/CodeWit...