13 lines
430 B
Go
13 lines
430 B
Go
package models
|
|
|
|
// 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,
|
|
// totp would be the seed,
|
|
// and passkey would be the webauthn.Credential, marshalled into json
|
|
type UserAuthMethod struct {
|
|
User User
|
|
UserId string
|
|
AuthMethod AuthenticationMethodType `gorm:"type:auth_method_type"`
|
|
Token []byte
|
|
}
|