Documentation
¶
Overview ¶
Package token provides token caching functionality for security module
Package token provides token caching functionality for security module
Index ¶
Constants ¶
View Source
const ( CacheAccess = "security:token:access" CacheRefresh = "security:token:refresh" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheStorage ¶
type CacheStorage interface {
// Store stores the token with a specific expiration time
Store(context.Context, string, time.Duration) error
// Exist checks if the token exists
Exist(context.Context, string) (bool, error)
// Remove deletes the token
Remove(context.Context, string) error
// Close closes the storage
Close(context.Context) error
}
CacheStorage is the interface for caching the Authenticator token.
type StorageOption ¶
type StorageOption = func(*tokenCacheStorage)
func WithCache ¶
func WithCache(c storageiface.Cache) StorageOption
Click to show internal directories.
Click to hide internal directories.