Skip to content

Commit

Permalink
Merge pull request #97 from yun-ink/feat/v3-1
Browse files Browse the repository at this point in the history
Update jwt.md
  • Loading branch information
kevwan authored Sep 16, 2023
2 parents d77a3c0 + a6f7433 commit 348c275
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/tutorials/http/server/jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ func handle(w http.ResponseWriter, r *http.Request) {
}
```

## JWT传输

在HTTP请求添加名为`Authorization`的header,形式如下
```html
Authorization: Bearer <token>
```

## JWT Token 生成示例

```go
Expand Down Expand Up @@ -83,4 +90,4 @@ jwt token 过期管理可以自己使用 redis 实现。

## 参考文献

- <a href="https://jwt.io/introduction/" target="_blank">《JSON Web Token》</a>
- <a href="https://jwt.io/introduction/" target="_blank">《JSON Web Token》</a>

0 comments on commit 348c275

Please sign in to comment.