Module 04 · Final Project期末项目
Hands-on Lab: Friends List Application Using Express Server with JWT动手实验:使用 Express 与 JWT 构建好友列表
In the CRUD lab you performed CRUD operations on transient data by creating API endpoints with an Express Server. In this lab, you will restrict these operations to authenticated users using JWT and session authentication.
在 CRUD 实验室中,您通过使用 Express 服务器创建 API 端点对临时数据进行 CRUD 操作。在本实验室中,您将限制这些操作仅限于经过 JWT 和会话认证的认证用户。
- In this lab, the friends object will be a JSON/dictionary with email as the key and friends object as the value. The friends object is a dictionary with firstName,lastName, DOB mapped to their respective values. You will thus be using “body” from the HTTP request instead of “query” and “params”.
在这个实验室中,"friends" 对象将是一个以 "email" 为键,以 "friends" 对象为值的 JSON/字典。"friends" 对象是一个字典,其中 "firstName"、"lastName"、"DOB" 映射到它们各自对应的值。因此,您将使用 HTTP 请求中的 "body" 而不是 "query" 和 "params"。 - Only authenticated users will be able to perform all the CRUD operations.
只有经过验证的用户才能执行所有 CRUD 操作。 - We will be testing the output of the endpoints on Postman.
我们将测试 Postman 上端点的输出。
📄 Practice Project - Friends List Application Using Express Server with JWT.pdf