Skip to content

Commit

Permalink
perf(oauth): update
Browse files Browse the repository at this point in the history
Access Token 可以是任何形式,只不过当前 Blessing Skin Server 使用的是 JWT。在不确定未来是否会更换 Access Token 的形式的情况下,对外明确说明其形式并不妥当。
实际上应用也无需了解 Access Token 中包含的内容,只需要将其作为一个给定值存储和传递即可。
  • Loading branch information
tnqzh123 committed Oct 1, 2024
1 parent 158d267 commit dd40c10
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/advanced/oauth2.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@ LittleSkin 支持 OAuth 2 服务端。你可以在你的应用中集成「使用
- 应用名称(将被展示在用户的授权界面上)
- 回调 URL / `redirect_uri`

你会被分配到
你将会被分配到

- 客户端 ID / `client_id`
- 客户端 Secret / `client_secret`

如果你使用 Blessing Skin Server 的 LittleSkin 登录插件,上述信息足矣。

## 有关 OAuth 2 的详细信息

如果你正在进行开发,下述的信息可能会有所帮助。
Expand Down Expand Up @@ -112,7 +110,7 @@ curl -X POST \
{
"token_type": "Bearer",
"expires_in": 31622400,
"access_token": "***J.W.T***",
"access_token": "******",
"refresh_token": "******"
}
```
Expand All @@ -121,8 +119,8 @@ curl -X POST \
| --------------- | ------------------------- |
| `token_type` | 令牌类型,固定值 `Bearer` |
| `expires_in` | 令牌的有效时间(秒) |
| `access_token` | Access Token (JWT 格式) |
| `refresh_token` | 刷新令牌 |
| `access_token` | Access Token |
| `refresh_token` | 刷新令牌 |

### 使用 Access Token

Expand Down

0 comments on commit dd40c10

Please sign in to comment.