mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-03 17:06:36 +08:00
861d61239a
Add WebAuthn passkey enrollment and login for issue #536, with trusted origin configuration, user verification, single-use challenges, and documented deployment and recovery behavior.
14 lines
549 B
Go
14 lines
549 B
Go
package model
|
|
|
|
// Passkey stores a WebAuthn credential for exactly one panel user.
|
|
type Passkey struct {
|
|
ID string `gorm:"primaryKey;type:varchar(512)"`
|
|
UserID int64 `gorm:"column:user_id;not null;index"`
|
|
Name string `gorm:"type:varchar(100);not null"`
|
|
CredentialJSON string `gorm:"column:credential_json;type:text;not null"`
|
|
CreatedAt int64 `gorm:"column:created_at;not null"`
|
|
LastUsedAt int64 `gorm:"column:last_used_at;not null;default:0"`
|
|
}
|
|
|
|
func (Passkey) TableName() string { return "passkey" }
|