配置双重认证 (2FA)
基于 TOTP (Time-Based One-Time Passwords) RFC 6238 标准
获取启用状态
GET/user/twoFactorAuth/status
请求
无参数
初始化配置
POST/user/twoFactorAuth/setup
请求
参数
类型
响应
参数
类型
{
"secret": "JBSWY3DPEHPK3PXP",
"otpauthUrl": "otpauth://totp/Arcadia:useradmin?secret=JBSWY3DPEHPK3PXP&issuer=Arcadia&algorithm=SHA1&digits=6&period=30",
"issuer": "Arcadia",
"message": "请使用 Google Authenticator 或 Microsoft Authenticator 扫描二维码"
}启用
POST/user/twoFactorAuth/enable
请求
参数
类型
需要验证传参
验证通过才会启用
关闭
POST/user/twoFactorAuth/disable
请求
无参数

