mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat: login 2fa
This commit is contained in:
parent
8d8ba150ef
commit
5abd9b75bb
33 changed files with 1063 additions and 122 deletions
|
@ -1,13 +1,16 @@
|
|||
package model
|
||||
|
||||
type Auth struct {
|
||||
Model
|
||||
Model
|
||||
|
||||
Name string `json:"name"`
|
||||
Password string `json:"-"`
|
||||
Status bool `json:"status" gorm:"default:1"`
|
||||
Name string `json:"name"`
|
||||
Password string `json:"-"`
|
||||
Status bool `json:"status" gorm:"default:1"`
|
||||
OTPSecret []byte `json:"-" gorm:"type:blob"`
|
||||
}
|
||||
|
||||
type AuthToken struct {
|
||||
Token string `json:"token"`
|
||||
UserID int `json:"user_id"`
|
||||
Token string `json:"token"`
|
||||
ExpiredAt int64 `json:"expired_at" gorm:"default:0"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue