Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpired = errors.New("expired") ErrInvalid = errors.New("invalid") ErrNotFound = errors.New("not found") )
predefined cache errors
Functions ¶
This section is empty.
Types ¶
type JWTCache ¶ added in v0.16.0
type JWTCache interface {
DeleteJWT(key string) error
LoadJWT(key string) (rawJWT string, err error)
StoreJWT(key string, rawJWT string) error
}
A JWTCache loads and stores JWTs.
type LocalJWTCache ¶ added in v0.16.0
type LocalJWTCache struct {
// contains filtered or unexported fields
}
A LocalJWTCache stores files in the user's cache directory.
func NewLocalJWTCache ¶ added in v0.16.0
func NewLocalJWTCache() (*LocalJWTCache, error)
NewLocalJWTCache creates a new LocalJWTCache.
func (*LocalJWTCache) DeleteJWT ¶ added in v0.16.0
func (cache *LocalJWTCache) DeleteJWT(key string) error
DeleteJWT deletes a raw JWT from the local cache.
type MemoryJWTCache ¶ added in v0.16.0
type MemoryJWTCache struct {
// contains filtered or unexported fields
}
A MemoryJWTCache stores JWTs in an in-memory map.
func NewMemoryJWTCache ¶ added in v0.16.0
func NewMemoryJWTCache() *MemoryJWTCache
NewMemoryJWTCache creates a new in-memory JWT cache.
func (*MemoryJWTCache) DeleteJWT ¶ added in v0.16.0
func (cache *MemoryJWTCache) DeleteJWT(key string) error
DeleteJWT deletes a JWT from the in-memory map.
Click to show internal directories.
Click to hide internal directories.