/auth/me/authenticator/backup
上传前端PBKDF2+AES-GCM加密的认证器备份,服务端仅存储密文无法解密。每个用户最多保存3个历史版本(LRU淘汰)
请求体
Schema: service-identity/internal/handler/dto.AuthenticatorBackupUploadRequest
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
encrypted_data |
string |
是 | AES-GCM-encrypted-base64... |
||
account_count |
integer |
否 | 5 |
||
backup_type |
string |
否 | totp |
||
checksum |
string |
否 | sha256-hash |
||
device_name |
string |
否 | iPhone 15 |
响应
| 状态 | 描述 | Schema |
|---|---|---|
| 201 | 备份上传成功 | service-identity/internal/handler/dto.AuthenticatorBackupDetailResponse |
引用的 Schema
service-identity/internal/handler/dto.AuthenticatorBackupDetailResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
code |
integer |
否 | |||
data |
service-identity/internal/handler/dto.AuthenticatorBackupResponse |
否 | |||
message |
string |
否 | |||
timestamp |
string |
否 |
service-identity/internal/handler/dto.AuthenticatorBackupResponse
| 字段 | 类型 | 必填 | 示例 | 约束 | 描述 |
|---|---|---|---|---|---|
account_count |
integer |
否 | 5 |
||
backup_type |
string |
否 | totp |
||
checksum |
string |
否 | sha256-hash |
||
created_at |
string |
否 | 2026-05-12T12:00:00Z |
||
device_name |
string |
否 | iPhone 15 |
||
encrypted_data |
string |
否 | AES-GCM-encrypted-base64... |
||
id |
string |
否 | backup-abc123 |
||
version |
integer |
否 | 1 |