Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReused = errors.New("nonce reuse detected")
Functions ¶
Types ¶
type MapVerifier ¶
MapVerifier keeps an in-memory map of nonces that it has seen. The map is pruned of expired tokens periodically. This is NOT SAFE for use in a distributed environment.
func NewMapVerifier ¶
func NewMapVerifier(pruneEvery time.Duration) *MapVerifier
NewMapVerifier creates a new nonce verifier that prunes expired nonces at the given cadence.
Click to show internal directories.
Click to hide internal directories.