add 2fa settings

This commit is contained in:
MaysWind
2020-11-02 00:02:40 +08:00
parent 7dc628cfcc
commit 78937d16d2
12 changed files with 535 additions and 8 deletions
+8
View File
@@ -25,6 +25,14 @@ type TwoFactorEnableConfirmResponse struct {
RecoveryCodes []string `json:"recoveryCodes"`
}
type TwoFactorDisableRequest struct {
Password string `json:"password" binding:"omitempty,min=6,max=128"`
}
type TwoFactorRegenerateRecoveryCodeRequest struct {
Password string `json:"password" binding:"omitempty,min=6,max=128"`
}
type TwoFactorStatusResponse struct {
Enable bool `json:"enable"`
CreatedAt int64 `json:"createdAt,omitempty"`