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

POST /auth/register/email-code

使用邮箱验证码完成无密码注册并自动登录,创建密码豁免用户。注册前需先调用发送验证码接口获取验证码。参考:OWASP ASVS V2.2。

身份认证 None application/json

Request Body

Schema: dto.RegisterByEmailCodeRequest

FieldTypeRequiredExampleConstraintsDescription
code string Yes
email string Yes
tenant_id string No
username string No

Responses

StatusDescriptionSchema
200注册成功并自动登录,返回JWT令牌dto.LoginByCodeResponse
400请求参数无效或验证码错误gitee_com_linmes_authms_base_dto.SimpleResponse
500服务器内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.LoginByCodeResponse

FieldTypeRequiredExampleConstraintsDescription
access_token string No
expires_in integer No
is_new_user boolean No
refresh_token string No
token_type string No
user dto.UserInfo No

dto.UserInfo

用户基本信息

FieldTypeRequiredExampleConstraintsDescription
created_at string No Account creation time
email string No Email
id string No User ID
must_change_password boolean No Password must be changed
password_expires_in integer No Days until password expires
password_warning string No Password warning: expiring/expired_grace/expired
phone string No Phone
status string No Status
username string No Username

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No