Question: Compulsory Task 2 Create an Express app by following the steps in the 'IMPLEMENTATION OF JWT ' section. It should have the following endpoints: -
Compulsory Task
Create an Express app by following the steps in the 'IMPLEMENTATION OF JWT section. It should have the following endpoints:
login checks a POSTed username and password and produces a JWT
resource checks the JWT in the auth header and displays a message with the username.
adminresource checks the JWT and displays a message if the token is verified and the token holder is an admin.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
