add models / services / handlers of user / token / 2fa, add web server command
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
Reference in New Issue
Block a user