Documentation
¶
Overview ¶
Package verification defines the VerificationToken primitive: a secure, expiring, single-use token reusable by the core (email verification, password reset) and by plugins (magic link, OTP, one-time token, ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Purpose ¶
type Purpose string
Purpose namespaces tokens so a token issued for one flow can never be consumed by another. Plugins should prefix their purposes ("magiclink:login").
type Token ¶
type Token struct {
ID string `json:"id"`
Purpose Purpose `json:"purpose"`
Subject string `json:"subject"`
TokenHash string `json:"token_hash"`
ExpiresAt time.Time `json:"expires_at"`
UsedAt *time.Time `json:"used_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Token is a single-use verification token. Only TokenHash is persisted.
Click to show internal directories.
Click to hide internal directories.