Add two-factor

This commit is contained in:
2024-03-01 15:33:30 +08:00
parent e563c2e8be
commit 935a1a223a
12 changed files with 399 additions and 4 deletions

26
src/global.d.ts vendored
View File

@@ -92,6 +92,7 @@ interface LoginParam {
account: string
password: string
captchaCode: string
twoFactorCode?: string
}
interface UserChangePasswordParam {
@@ -99,9 +100,18 @@ interface UserChangePasswordParam {
newPassword: string
}
interface TwoFactorValidateParam {
code: string
}
interface TwoFactorRemoveParam {
code: string
}
interface UserWithInfoVo {
id: string
username: string
twoFactor: boolean
verified: boolean
locking: boolean
expiration: string
@@ -119,6 +129,7 @@ interface UserWithInfoVo {
interface UserWithPowerInfoVo {
id: string
username: string
twoFactor: boolean
verified: boolean
locking: boolean
expiration: string
@@ -140,6 +151,7 @@ interface UserWithPowerInfoVo {
interface UserWithRoleInfoVo {
id: string
username: string
twoFactor: boolean
verify: string
locking: boolean
expiration: string
@@ -164,6 +176,10 @@ interface UserInfoVo {
email: string
}
interface TwoFactorVo {
qrCodeSVGBase64: string
}
interface ModuleVo {
id: number
name: string
@@ -402,6 +418,16 @@ interface SensitiveWordUpdateParam {
ids: string[]
}
interface TwoFactorSettingsVo {
issuer: string
secretKeyLength: number
}
interface TwoFactorSettingsParam {
issuer: string
secretKeyLength: number
}
interface SoftwareInfoVo {
os: string
bitness: number