Versions in this module Expand all Collapse all v0 v0.1.0 Dec 19, 2023 v0.0.0 Dec 19, 2023 Changes in this version + var DefaultTokenCache = &memoryCache + type Token struct + Deadline time.Time + Expirable bool + Value string + func NewTokenFromJSON(buf []byte) (Token, error) + func (t *Token) Expire() + func (t *Token) IsValid(now time.Time, softExpire time.Duration, debugf func(format string, v ...any)) bool + func (t *Token) SetExpiration(deadline time.Time) + func (t Token) ExportJSON() ([]byte, error) + type TokenCache interface + Expire func() error + Get func() (Token, error) + Put func(t Token) error