implement email verification feature, add captcha validation middleware, and enhance user authentication flow

This commit is contained in:
2025-07-22 08:50:16 +08:00
parent 6187425df6
commit a0d215fa2e
26 changed files with 844 additions and 50 deletions

View File

@ -14,9 +14,9 @@ type UserLoginReq struct {
}
type UserLoginResp struct {
Token string `json:"token"`
RefreshToken string `json:"refresh_token"`
User UserDto `json:"user"`
Token string `json:"token"`
RefreshToken string `json:"refresh_token"`
User *UserDto `json:"user"`
}
type UserRegisterReq struct {
@ -31,3 +31,11 @@ type UserRegisterResp struct {
RefreshToken string `json:"refresh_token"` // 刷新令牌
User UserDto `json:"user"` // 用户信息
}
type VerifyEmailReq struct {
Email string `json:"email"` // 邮箱地址
}
type VerifyEmailResp struct {
Success bool `json:"success"` // 验证码发送成功与否
}