Versions in this module Expand all Collapse all v1 v1.1.0 May 8, 2024 v1.0.0 May 5, 2023 Changes in this version + var ErrInvalidToken = errors.New("invalid token") + type Storage interface + FindToken func(ctx context.Context, id dbo.KeyID) (*dbo.Token, error) + UpdateTokensStats func(ctx context.Context, stats []dbo.TokenStat) error + type Validator struct + func NewValidator(storage Storage, cacheCapacity int, cacheTTL time.Duration) *Validator + func (v *Validator) Invalidate(keyID dbo.KeyID) + func (v *Validator) UpdateStats(ctx context.Context) error + func (v *Validator) Valid(ctx context.Context, path string, token string) (*dbo.Token, error)