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
新增多筆文章後在 Postman 網址列輸入 `http://127.0.0.1:3000/api/user/login` 並選擇 POST 請求方式,接下來是要放一筆當時建立用戶的信箱與密碼至 `Body > raw > 選擇 JSON(application/json)` 並用物件 JSON 型態包裝起來,完成後送出取得 API Token ,最後再拿此 API Token 來訪問今天實作的 API 內容。
87
+
88
+
```json
89
+
{
90
+
"user_mail":"andy@gmail.com",
91
+
"user_password":"password10"
92
+
}
93
+
```
94
+
95
+
<imgsrc="/images/posts/it2018/img1070113-1.png">
96
+
<imgsrc="/images/posts/it2018/img1070113-2.png">
97
+
98
+
#### 3. JWT驗證並訪問API內容
99
+
在 Postman 網址列輸入 `http://127.0.0.1:3000/api/article/personal` 後選擇 GET 並點選 Headers 並將 Key 放上 Authorization ,而 Value 放上 Bearer+JWT(注意記得空白隔開),如下。
0 commit comments