mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-06 08:02:06 +00:00
22 lines
391 B
Go
22 lines
391 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// UserTOTP is a user's TOTP 2FA settings row (the secret is sealed at rest).
|
|
type UserTOTP struct {
|
|
UserID uuid.UUID
|
|
SecretSealed string
|
|
Enabled bool
|
|
ConfirmedAt *time.Time
|
|
}
|
|
|
|
// RecoveryCode is one (argon2-hashed) single-use 2FA recovery code.
|
|
type RecoveryCode struct {
|
|
ID uuid.UUID
|
|
CodeHash string
|
|
}
|