/auth/generate-ticket
为指定用户生成一次性登录票据(5分钟有效,一次性使用),用于SSO跳转或管理员代登录场景。需要JWT认证,由管理员或系统调用。
Request Body
Schema: dto.GenerateTicketInput
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
user_id |
string |
Yes | usr_abc123 |
用户ID | |
tenant_id |
string |
No | tnt_xyz789 |
租户ID |
Responses
| Status | Description | Schema |
|---|---|---|
| 200 | 票据已生成,返回票据和过期时间 | dto.GenerateTicketResponse |
| 400 | 请求参数无效 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 401 | 未认证或令牌无效 | gitee_com_linmes_authms_base_dto.SimpleResponse |
| 500 | 服务器内部错误 | gitee_com_linmes_authms_base_dto.SimpleResponse |
Referenced Schemas
dto.GenerateTicketResponse
Web3钱包登录票据
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
expires_in |
integer |
No | 300 |
||
ticket |
string |
No | a1b2c3d4e5f6... |
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
|---|---|---|---|---|---|
code |
integer |
No | |||
message |
string |
No | |||
timestamp |
string |
No |