- v1
- auth
- route
- system-manage
- miniapp
登录
POST
/api/v1/auth/login
v1权限认证
请求参数
Header 参数
Authorization
string
可选
默认值:
Bearer {{token}}
Body 参数application/json
userName
string
Username
password
string
Password
示例
{
"userName": "Soybean",
"password": "123456"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/auth/login' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"userName": "Soybean",
"password": "123456"
}'
返回响应
🟢200成功
application/json
Body
code
string
必需
msg
string
必需
data
object
必需
token
string
必需
refreshToken
string
必需
示例
{
"code": "0000",
"msg": "OK",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVzZXJJZCI6MSwidXNlck5hbWUiOiJTb3liZWFuIiwidG9rZW5UeXBlIjoicmVmcmVzaFRva2VuIn0sImlhdCI6MTcxNTkyNTUzMywiZXhwIjoxNzE1OTY4NzMzfQ.fTPV9QKUuJ48T652SKqoNY4MAFrvIg5Prbo-YZ0LEHQ",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7InVzZXJJZCI6MSwidXNlck5hbWUiOiJTb3liZWFuIiwidG9rZW5UeXBlIjoicmVmcmVzaFRva2VuIn0sImlhdCI6MTcxNTkyNTUzMywiZXhwIjoxNzE2NTMwMzMzfQ.PwHg3toAhav449ZWOcGRZxtLJR_ZssIRgEKSwCxkBs8"
}
}
🟠422Validation Error
修改于 2024-06-20 02:30:04