POST /mfa/totp/devices
为用户注册一个新的TOTP设备,生成独立的密钥和二维码,支持多设备管理。参考:RFC 6238 (TOTP)、OWASP ASVS V2.8.3。
MFA `bearerAuth` application/json
Request Body
Schema: dto.TOTPDeviceRegisterRequest
| Field | Type | Required | Example | Constraints | Description |
device_name |
string |
Yes |
iPhone 15 |
|
|
account |
string |
No |
user@example.com |
|
|
device_fingerprint |
string |
No |
fp-abc123 |
|
|
Referenced Schemas
dto.TOTPDeviceRegisterDetailResponse
dto.TOTPDeviceRegisterResponse
| Field | Type | Required | Example | Constraints | Description |
device_id |
string |
No |
dev-abc123 |
|
|
device_name |
string |
No |
iPhone 15 |
|
|
qr_code |
string |
No |
data:image/png;base64,... |
|
|
qr_code_url |
string |
No |
otpauth://totp/... |
|
|
secret |
string |
No |
JBSWY3DPEHPK3PXP |
|
|
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|