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 ¶
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 ¶
type LocalJWTCache struct {
// contains filtered or unexported fields
}
A LocalJWTCache stores files in the user's cache directory.
func NewLocalJWTCache ¶
func NewLocalJWTCache() (*LocalJWTCache, error)
NewLocalJWTCache creates a new LocalJWTCache.
func (*LocalJWTCache) DeleteJWT ¶
func (cache *LocalJWTCache) DeleteJWT(key string) error
DeleteJWT deletes a raw JWT from the local cache.
type MemoryJWTCache ¶
type MemoryJWTCache struct {
// contains filtered or unexported fields
}
A MemoryJWTCache stores JWTs in an in-memory map.
func NewMemoryJWTCache ¶
func NewMemoryJWTCache() *MemoryJWTCache
NewMemoryJWTCache creates a new in-memory JWT cache.
func (*MemoryJWTCache) DeleteJWT ¶
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.