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

POST /auth/register

使用用户名、邮箱、手机号和密码创建账户,支持开放注册、邀请注册和审批三种成员加入方式。创建成功后自动发送欢迎通知。参考:OWASP ASVS V2.2。

身份认证 None application/json

Request Body

Schema: dto.RegisterRequest

FieldTypeRequiredExampleConstraintsDescription
password string Yes length: 8–256 Password or hash/ciphertext
birth_date string No Birth date (format: "2006-01-02")
client_nonce string No hash 模式: 客户端随机 nonce
email string No Email
invitation_code string No 邀请码(invitation_only 模式下必填)
password_transmission string No plain|hash|symmetric|asymmetric
phone string No Phone
username string No length: 3–32 Username

Responses

StatusDescriptionSchema
201注册成功,返回用户ID和状态dto.RegisterResponse
400请求参数无效或用户名已存在gitee_com_linmes_authms_base_dto.SimpleResponse
500服务器内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.RegisterResponse

用户注册结果

FieldTypeRequiredExampleConstraintsDescription
membership_status string No 成员状态(审批模式下为 pending)
message string No Message
status string No Status
user_id string No User ID

gitee_com_linmes_authms_base_dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No