Documentation
¶
Overview ¶
Package ratelimit provides rate limiting functionality for email authentication.
This package implements a token bucket algorithm to prevent abuse of magic link emails by limiting how many times a user can request login links within a time window. Currently used exclusively for email authentication send rate limiting.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter implements a simple token bucket rate limiter backed by KVS Currently used to rate limit email authentication magic link sends.
func NewLimiter ¶
NewLimiter creates a new rate limiter backed by KVS rate: number of allowed requests interval: time window for the rate
Click to show internal directories.
Click to hide internal directories.