A AuthMS API Wiki API Reference iam.tianv.com →

POST /auth/forgot-password

用户忘记密码时,通过邮箱或手机号发送密码重置验证码,支持邮箱和短信两种方式。参考:NIST SP 800-63B §5.1.1.2、OWASP ASVS V2.1。

身份认证 None application/json

Request Body

Schema: dto.ForgotPasswordRequest

FieldTypeRequiredExampleConstraintsDescription
identity string Yes Email or phone

Responses

StatusDescriptionSchema
200验证码已发送至关联邮箱或手机dto.ForgotPasswordResponse
400请求参数无效或用户不存在gitee_com_linmes_authms_base_dto.SimpleResponse
500服务器内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.ForgotPasswordResponse

忘记密码响应

FieldTypeRequiredExampleConstraintsDescription
expires_in integer No Expiration time
message string No Message

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No