modify: auth插件拆分,将token签发部分交给网关

This commit is contained in:
2026-09-10 16:43:43 +08:00
parent 5ec90a5575
commit c139b0c1d3
23 changed files with 691 additions and 290 deletions
+2 -13
View File
@@ -20,18 +20,6 @@ class ChangePasswordPostResponse(BaseModel):
message: str = Field(...)
timestamp: Optional[float] = Field(default=None)
class LoginPostRequest(BaseModel):
"""登录 — 请求体"""
username: str = Field(...)
password: str = Field(...)
class LoginPostResponse(BaseModel):
"""登录 — 响应体"""
result: str = Field(...)
token: str = Field(...)
message: str = Field(...)
timestamp: Optional[float] = Field(default=None)
class MeGetRequest(BaseModel):
"""获取当前用户信息 — 请求体"""
user_id: str = Field(...)
@@ -83,4 +71,5 @@ class UpdateProfilePostResponse(BaseModel):
# 所有响应模型的联合类型
AuthResponse = LoginPostResponse | ChangePasswordPostResponse | MeGetResponse | UpdateProfilePostResponse | RegisterPostResponse
# (登录响应 LoginPostResponse 已随内置登录迁移至 chongming_auth 包)
AuthResponse = ChangePasswordPostResponse | MeGetResponse | UpdateProfilePostResponse | RegisterPostResponse