Skip to content

Commit 24134fa

Browse files
committed
feat: auth interface update
1 parent 684e2f7 commit 24134fa

File tree

3 files changed

+157
-0
lines changed

3 files changed

+157
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"position": 4,
3+
"label": "认证管理",
4+
"collapsible": true,
5+
"collapsed": true
6+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: 强制下线
3+
hide_title: true
4+
---
5+
6+
<center>
7+
8+
## 强制下线
9+
10+
</center>
11+
12+
### 简要描述
13+
-
14+
### 请求方式
15+
- `post`
16+
### 请求URL
17+
- `{{host}}/auth/force_logout`
18+
19+
20+
### Header
21+
|header名|示例值|选填|类型|说明|
22+
|:---- |:------- |:--- |---|------ |
23+
|operationID|879654321|必填|string|operationID用于全局链路追踪|
24+
|token|eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiJvcGVuSU02NTQzMjEiLCJQbGF0Zm9ybUlEIjowLCJleHAiOjE2OTY0OTE4NTAsIm5iZiI6MTY4ODcxNTU1MCwiaWF0IjoxNjg4NzE1ODUwfQ.Mfhg3OiRtJY48rZbKWecNeydnHWW-GK3R2x0z8I-3Xs|必填|string|管理员或者用户token|
25+
26+
27+
### 请求参数示例
28+
29+
30+
```json
31+
{
32+
"platformID": 2,
33+
"userID": "4950983283"
34+
}
35+
```
36+
|字段名|选填|类型|说明|
37+
|:---- |:------- |:--- |---|
38+
|platformID|必填|string|平台ID,iOS 1, Android 2, Windows 3, OSX 4, WEB 5, 小程序 6,linux 7, AndroidPad 8, IPad 9, Admin 10|
39+
|userID|必填|string|被踢的用户ID |
40+
### 成功返回示例
41+
42+
43+
```json
44+
{
45+
"errCode": 0,
46+
"errMsg": "",
47+
"errDlt": ""
48+
}
49+
```
50+
### 成功返回示例的参数说明
51+
52+
53+
|参数名|类型|说明|
54+
|:---- |:------- |:--- |
55+
|errCode|int|错误码,0表示成功|
56+
|errMsg|string|错误简要信息,无错误时为空|
57+
|errDlt|errDlt|错误详细信息,无错误时为空|
58+
|data|object|通用数据对象,具体结构见下方|
59+
### 失败返回示例
60+
61+
62+
```json
63+
64+
```
65+
### 失败返回示例的参数说明
66+
67+
68+
|参数名|类型|说明|
69+
|:---- |:------- |:--- |
70+
|errCode|int|错误码,具体查看全局错误码文档|
71+
|errMsg|string|错误简要信息|
72+
|errDlt|errDlt|错误详细信息|
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: 获取用户token
3+
hide_title: true
4+
---
5+
6+
<center>
7+
8+
## 获取用户token
9+
10+
</center>
11+
12+
### 简要描述
13+
-
14+
### 请求方式
15+
- `post`
16+
### 请求URL
17+
- `{{host}}/auth/user_token`
18+
19+
20+
### Header
21+
|header名|示例值|选填|类型|说明|
22+
|:---- |:------- |:--- |---|------ |
23+
|operationID|879654321|必填|string|operationID用于全局链路追踪|
24+
25+
26+
### 请求参数示例
27+
28+
29+
```json
30+
{
31+
"secret": "tuoyun",
32+
"platformID": 1,
33+
"userID": "9319319034"
34+
}
35+
```
36+
|字段名|选填|类型|说明|
37+
|:---- |:------- |:--- |---|
38+
|secret|必填|string|openIM 密钥,用于注册或者获取token时候的验证,配置在openIM的config/config.yaml中|
39+
|platformID|必填|int|平台ID|
40+
|userID|必填|string|用户ID|
41+
### 成功返回示例
42+
43+
44+
```json
45+
{
46+
"errCode": 0,
47+
"errMsg": "",
48+
"errDlt": "",
49+
"data": {
50+
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySUQiOiI5MzE5MzE5MDM0IiwiUGxhdGZvcm1JRCI6MSwiZXhwIjoxNjk2NDkyMjcyLCJuYmYiOjE2ODg3MTU5NzIsImlhdCI6MTY4ODcxNjI3Mn0.8UnNN7RWTgqU4nL97VwqPVOcKQfohRbhv7SgLgu88zw",
51+
"expireTimeSeconds": 7776000
52+
}
53+
}
54+
```
55+
### 成功返回示例的参数说明
56+
57+
58+
|参数名|类型|说明|
59+
|:---- |:------- |:--- |
60+
|errMsg|string|错误简要信息,无错误时为空|
61+
|errDlt|errDlt|错误详细信息,无错误时为空|
62+
|data|object|通用数据对象,具体结构见下方|
63+
|errCode|int|错误码,0表示成功|
64+
|token|string|获取到的用户token|
65+
|expireTimeSeconds|string|token的过期时间(单位秒)|
66+
### 失败返回示例
67+
68+
69+
```json
70+
71+
```
72+
### 失败返回示例的参数说明
73+
74+
75+
|参数名|类型|说明|
76+
|:---- |:------- |:--- |
77+
|errCode|int|错误码,具体查看全局错误码文档|
78+
|errMsg|string|错误简要信息|
79+
|errDlt|errDlt|错误详细信息|

0 commit comments

Comments
 (0)