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

POST /mfa/devices/sync

上传设备TOTP配置数据,加密存储并返回同步令牌。参考:RFC 6238 (TOTP)、OWASP ASVS V2.8.3。

MFA `bearerAuth` application/json

Request Body

Schema: dto.DeviceSyncRequest

FieldTypeRequiredExampleConstraintsDescription
device_name string Yes iPhone 15
totp_devices string Yes [{"secret":"JBSWY3DPEHPK3PXP"}]
device_fingerprint string No fp-abc123

Responses

StatusDescriptionSchema
201设备同步成功dto.DeviceSyncDetailResponse
400参数错误gitee_com_linmes_authms_base_dto.SimpleResponse
401未认证gitee_com_linmes_authms_base_dto.SimpleResponse
409设备数量已达上限gitee_com_linmes_authms_base_dto.SimpleResponse
500服务器内部错误gitee_com_linmes_authms_base_dto.SimpleResponse

Referenced Schemas

dto.DeviceSyncDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.DeviceSyncResponse No
message string No
timestamp string No

dto.DeviceSyncResponse

FieldTypeRequiredExampleConstraintsDescription
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

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No