You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement access control for user-related routes to ensure only authenticated users can access them. Specifically, the following routes need to be protected:
GET /users
GET /users/:username
Key Requirements:
Authentication Middleware:
Use the validateAccessToken middleware to ensure only logged-in users can access these routes.
Description:
Implement access control for user-related routes to ensure only authenticated users can access them. Specifically, the following routes need to be protected:
GET /users
GET /users/:username
Key Requirements:
Authentication Middleware:
validateAccessToken
middleware to ensure only logged-in users can access these routes.Route Protection:
Testing:
401 Unauthorized
response when trying to access these routes.Tasks:
validateAccessToken
middleware to the/users
and/users/:username
routes.The text was updated successfully, but these errors were encountered: