POST /auth/register
使用用户名、邮箱、手机号和密码创建账户,支持开放注册、邀请注册和审批三种成员加入方式。创建成功后自动发送欢迎通知。参考:OWASP ASVS V2.2。
身份认证 None application/json
Request Body
Schema: dto.RegisterRequest
| Field | Type | Required | Example | Constraints | Description |
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 |
Referenced Schemas
dto.RegisterResponse
用户注册结果
| Field | Type | Required | Example | Constraints | Description |
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
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|