POST /auth/ticket/signin

使用后台生成的一次性票据完成登录,票据验证成功后立即失效(一次性使用),返回JWT令牌。适用于跨系统SSO和管理员代登录场景。参考:RFC 6749 §1.5。

身份认证 None application/json

请求体

Schema: service-identity/internal/handler/dto.TicketSigninRequest

字段类型必填示例约束描述
ticket string 是 a1b2c3d4... 一次性票据

响应

状态描述Schema
200登录成功,返回JWT令牌service-identity/internal/handler/dto.LoginResponse
400票据无效或已过期service-core/base/dto.SimpleResponse
500服务器内部错误service-core/base/dto.SimpleResponse

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-identity/internal/handler/dto.LoginResponse

用户登录结果

字段类型必填示例约束描述
access_token string 否 eyJhbGciOi... Access token
challenge_token string 否 chg_abc123... MFA challenge token (short-lived, requires MFA verification)
enrolled_mfa_methods array of

string

否 用户已开通的 MFA 方法(挑战页仅展示这些)
expires_in integer 否 1800 Expiration time
membership_status string 否 pending MembershipStatus 新注册待审批(WS-A A3);pending 时不返回 token。
mfa_check_reason string 否 new_device MFA触发原因描述
must_change_password boolean 否 False Password must be changed
password_expires_in integer 否 30 Days until password expires
password_warning string 否 expiring Password warning: expiring/expired_grace/expired
refresh_token string 否 eyJhbGciOi... Refresh token
required_mfa_methods array of

string

否 MFA推荐方法列表
requires_mfa boolean 否 False 自适应MFA: 需要额外MFA验证
risk_assessment object 否 Risk assessment
risk_level string 否 low 风险等级: low/medium/high
token_type string 否 Bearer Token type
user object 否 User info
user_id string 否 User ID (redundant with User.ID for flat access)

service-identity/internal/handler/dto.RiskAssessmentInfo

字段类型必填示例约束描述
level string 否
recommended_mfa_methods array of

string

否
require_mfa boolean 否
score integer 否

service-identity/internal/handler/dto.UserInfo

用户基本信息

字段类型必填示例约束描述
created_at string 否 2026-01-15T10:30:00Z Account creation time
email string 否 john@example.com Email
id string 否 usr_abc123 User ID
last_login_at string 否 2026-07-20T08:00:00Z Last login time
metadata object 否 AUTH-44:metadata 仅 /auth/me 回传(portal 偏好等);其余构造点省略。
mfa_enabled boolean 否 True AUTH-44:指针 + omitempty —— 仅权威构造点(/auth/me)填充;其余构造点省略该键, 避免登录响应等处误报 mfa_enabled=false(零值不等于"未启用")。
must_change_password boolean 否 False Password must be changed
password_expires_in integer 否 30 Days until password expires
password_warning string 否 expiring Password warning: expiring/expired_grace/expired
phone string 否 13800138000 Phone
status string 否 active Status
username string 否 john.doe Username