(b) Construct a code segment to define the routes for the update and destroy actions where both routes must be protected
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
(b) Construct a code segment to define the routes for the update and destroy actions where both routes must be protected
(b) Construct a code segment to define the routes for the update and destroy actions where both routes must be protected by the JSON Web Token Authentication middleware. (5 marks) (c) Define the login method for the UserController to authenticate a user using JSON Web Token. On success, the method returns the token as a JSON response. Otherwise, appropriate error information is returned also as a JSON response. The token shall use the name AppTokenSecret and expires in 7 days. (9 marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!