Page 1 of 1

(b) Construct a code segment to define the routes for the update and destroy actions where both routes must be protected

Posted: Sat May 14, 2022 6:45 pm
by answerhappygod
B Construct A Code Segment To Define The Routes For The Update And Destroy Actions Where Both Routes Must Be Protected 1
B Construct A Code Segment To Define The Routes For The Update And Destroy Actions Where Both Routes Must Be Protected 1 (44.17 KiB) Viewed 40 times
(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)