parent
4fb0e17b69
commit
ef91558600
8 changed files with 73 additions and 19 deletions
|
@ -1,5 +1,7 @@
|
|||
package models
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
// One authentication method linked to one account.
|
||||
// Contains the method and whatever the token may be
|
||||
// For a password, this would be a hash of that password,
|
||||
|
@ -8,7 +10,7 @@ package models
|
|||
//
|
||||
// Password hashes may only exist at most once per user, the rest 0-m
|
||||
type UserAuthMethod struct {
|
||||
ID uint64 `gorm:"primarykey"`
|
||||
gorm.Model
|
||||
User User
|
||||
UserId string
|
||||
AuthMethod AuthenticationMethodType `gorm:"type:auth_method_type"`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue