add models / services / handlers of user / token / 2fa, add web server command

This commit is contained in:
MaysWind
2020-10-17 20:01:24 +08:00
parent c9ae001aef
commit 60c31e8894
18 changed files with 1649 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
package models
type TwoFactorRecoveryCode struct {
Uid int64 `xorm:"PK"`
RecoveryCode string `xorm:"VARCHAR(64) PK"`
Used bool `xorm:"NOT NULL"`
CreatedUnixTime int64
UsedUnixTime int64
}
type TwoFactorRecoveryCodeLoginRequest struct {
RecoveryCode string `json:"recoveryCode" binding:"required,notBlank,len=11"`
}