POST /mfa/devices/sync
上传设备TOTP配置数据,加密存储并返回同步令牌。参考:RFC 6238 (TOTP)、OWASP ASVS V2.8.3。
MFA `bearerAuth` application/json
Request Body
Schema: dto.DeviceSyncRequest
| Field | Type | Required | Example | Constraints | Description |
device_name |
string |
Yes |
iPhone 15 |
|
|
totp_devices |
string |
Yes |
[{"secret":"JBSWY3DPEHPK3PXP"}] |
|
|
device_fingerprint |
string |
No |
fp-abc123 |
|
|
Referenced Schemas
dto.DeviceSyncDetailResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.DeviceSyncResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.DeviceSyncResponse
| Field | Type | Required | Example | Constraints | Description |
created_at |
string |
No |
2026-05-21T12:00:00Z |
|
|
device_fingerprint |
string |
No |
fp-abc123 |
|
|
device_name |
string |
No |
iPhone 15 |
|
|
id |
string |
No |
devsync_abc123 |
|
|
last_sync_at |
string |
No |
2026-05-21T12:00:00Z |
|
|
sync_token |
string |
No |
hex-sync-token |
|
|
totp_devices |
string |
No |
[{"secret":"JBSWY3DPEHPK3PXP"}] |
|
|
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|