POST /mfa/trusted-devices

将当前设备标记为受信设备,30天内免MFA验证。参考:NIST SP 800-63B §5.1 (Verifier Impersonation Resistance)、OWASP ASVS V2.8。

多因素认证 `bearerAuth` application/json

请求体

Schema: service-mfa/internal/handler/dto.TrustDeviceRequest

字段类型必填示例约束描述
device_fingerprint string 是
device_name string 是
user_agent string 否

响应

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-mfa/internal/handler/dto.TrustedDeviceDataResponse

字段类型必填示例约束描述
code integer 否
data service-mfa/internal/handler/dto.TrustedDeviceItem 否
message string 否
timestamp string 否

service-mfa/internal/handler/dto.TrustedDeviceItem

字段类型必填示例约束描述
created_at string 否 2026-05-25T08:00:00Z
device_name string 否 iPhone 15
id string 否 td_abc123
ip_address string 否 192.168.1.100
trusted_until string 否 2026-06-25T08:00:00Z