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

POST /mfa/totp/devices

为用户注册一个新的TOTP设备,生成独立的密钥和二维码,支持多设备管理。参考:RFC 6238 (TOTP)、OWASP ASVS V2.8.3。

MFA `bearerAuth` application/json

Request Body

Schema: dto.TOTPDeviceRegisterRequest

FieldTypeRequiredExampleConstraintsDescription
device_name string Yes iPhone 15
account string No user@example.com
device_fingerprint string No fp-abc123

Responses

StatusDescriptionSchema
201设备注册成功dto.TOTPDeviceRegisterDetailResponse
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.TOTPDeviceRegisterDetailResponse

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

dto.TOTPDeviceRegisterResponse

FieldTypeRequiredExampleConstraintsDescription
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

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No