-
Notifications
You must be signed in to change notification settings - Fork 1
Administrator API
唯一 edited this page Jun 1, 2020
·
12 revisions
POST /api/v1/user/admin/auth/register
| Field | Type | Option | Description |
|---|---|---|---|
| account | string | No | account. email or mobile |
| password | string | No | password. 6-20 length |
| confirm_password | string | No | confirm password |
{
"account": "mail@example.com",
"password": "123456",
"confirm_password": "123456"
}| Field | Type | Description |
|---|---|---|
| admin_id | string | 帐户id |
{
"code": 0,
"msg": "success",
"data": {
"admin_id": "131"
}
}POST /api/v1/user/admin/auth/jwt/token
| Field | Type | Option | Description |
|---|---|---|---|
| account | string | No | account. email or mobile |
| password | string | No | password |
{
"account": "mail@example.com",
"password": "123456"
}| Field | Type | Description |
|---|---|---|
| access_token | string | 帐户id |
| expires_in | int | access_token过期时间,单位秒 |
| refresh_expires_in | int | 可刷新access_token的过期时间,单位秒 |
{
"code": 0,
"msg": "success",
"data": {
"access_token": "JWT Access Token",
"expires_in": 7200,
"refresh_expires_in": 2592000
}
}