接口
认证
无需认证。请求体
string
required
账户的用户名。
string
required
账户的密码。
响应
string
已认证用户的唯一标识符。
string
已认证用户的用户名。
string | null
若已设置则为邮箱,否则为 null。
string
用户角色,例如
"user" 或 "admin"。boolean
账户当前是否被禁用。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST https://router.example.com:8080/v1/router/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"alice","password":"secret123"}' \
-c cookies.txt
{
"id": "user-abc123",
"username": "alice",
"email": "[email protected]",
"role": "user",
"disabled": false
}
POST /v1/router/auth/login 对用户进行认证,并设置一个会话 Cookie,用于咏唱引擎 ROUTER 的管理与数据面访问。
curl -X POST https://router.example.com:8080/v1/router/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"alice","password":"secret123"}' \
-c cookies.txt
{
"id": "user-abc123",
"username": "alice",
"email": "[email protected]",
"role": "user",
"disabled": false
}
POST /v1/router/auth/login
"user" 或 "admin"。curl -X POST https://router.example.com:8080/v1/router/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"alice","password":"secret123"}' \
-c cookies.txt
{
"id": "user-abc123",
"username": "alice",
"email": "[email protected]",
"role": "user",
"disabled": false
}
Was this page helpful?