POST /auth/register/oauth
使用OAuth回调生成的pending_token完成注册,创建用户并自动绑定OAuth连接和提供商信息,返回JWT令牌。注册后的审批流程由租户的成员资格策略控制。参考:RFC 6749 §4.1、OWASP ASVS V2.2。
身份认证 None application/json
Request Body
Schema: dto.RegisterByOAuthRequest
| Field | Type | Required | Example | Constraints | Description |
agree_terms |
boolean |
Yes |
|
|
|
password |
string |
Yes |
|
length: 8–128 |
|
pending_token |
string |
Yes |
|
|
|
phone |
string |
No |
|
|
|
username |
string |
No |
|
length: 3–32 |
|
Referenced Schemas
dto.LoginByCodeResponse
| Field | Type | Required | Example | Constraints | Description |
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.RegisterByOAuthResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.LoginByCodeResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.UserInfo
用户基本信息
| Field | Type | Required | Example | Constraints | Description |
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
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|