Главная
Study mode:
on
1
Intro
2
Welcome
3
Authentication vs Authorization
4
Configure the User Roles
5
Add roles to the user data model
6
Add a user role at registration
7
Add user roles to access token at authentication
8
Add user roles to access token when refreshed
9
Update the verifyJWT middleware to include roles
10
Create the verifyRoles middleware
11
Add the verifyRoles middleware to routes
12
Test routes with Thunder Client
13
A quick note on Thunder Client
Description:
Learn how to implement user role-based authorization in a Node.js and Express application. Explore the differences between authentication and authorization, configure user roles, update the user data model, and integrate roles into the registration and authentication processes. Implement middleware to verify JSON Web Tokens (JWTs) with role information, create custom middleware for role-based access control, and apply it to specific routes. Test the newly implemented authorization system using Thunder Client, and gain insights into best practices for securing your REST API endpoints based on user permissions.

How to Authorize User Roles and Permissions - Node.js & Express Authorization Tutorial

Dave Gray
Add to list
0:00 / 0:00