Files
2026-10-23 19:28:17 +08:00

48 lines
1.2 KiB
HTTP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@StoreHub_HostAddress = http://localhost:5295
# ============ 认证(JWT) ============
### 登录:返回 token(同账号可同时登录,独立记录会话和 IP)
# @name login
POST {{StoreHub_HostAddress}}/api/v1/Auth/Login
Content-Type: application/json
{
"userName": "18990011234",
"password": "18990011234"
}
### 获取当前登录用户信息(需携带 Bearer Token,先执行上面的 login)
GET {{StoreHub_HostAddress}}/api/v1/Auth/Me
Authorization: Bearer {{login.response.body.$.data.token}}
### 退出登录:仅撤销当前会话,其他客户端不受影响
POST {{StoreHub_HostAddress}}/api/v1/Auth/Logout
Authorization: Bearer {{login.response.body.$.data.token}}
### 在线人员列表(需携带 Bearer Token)
GET {{StoreHub_HostAddress}}/api/v1/Auth/OnlineUsers
Authorization: Bearer {{login.response.body.$.data.token}}
# ============ 示例接口 ============
### 模板自带的 WeatherForecast
GET {{StoreHub_HostAddress}}/api/v1/weatherforecast/
Accept: application/json
POST {{StoreHub_HostAddress}}/api/v1/Auth/Login
Content-Type: application/json
{
//LoginRequest
}
###
POST {{StoreHub_HostAddress}}/api/v1/Auth/Login
Content-Type: application/json
{
//LoginRequest
}