Versions in this module Expand all Collapse all v0 v0.1.1 Jun 11, 2026 v0.1.0 Jun 10, 2026 Changes in this version + var ErrMalformedToken = errors.New("malformed token") + var ErrNoToken = errors.New("no token stored for context (run `finna login`)") + func Delete(contextName string) error + func DeleteAll(contextNames []string) error + func Get(contextName string) (string, error) + func Set(contextName, jwt string) error + func TokenProvider(contextName string) func() (string, error) + type Claims struct + Exp int64 + IsAdmin bool + IssuedAt int64 + Issuer string + Provider string + Raw map[string]any + Sub string + Username string + func DecodeJWT(token string) (*Claims, error) + func (c *Claims) Expired() bool + func (c *Claims) ExpiresAt() time.Time + func (c *Claims) ExpiresSoon(d time.Duration) bool