Documentation
¶
Overview ¶
Package cache provides token caching functionality for security module
Package cache provides token caching functionality for security module
Index ¶
Constants ¶
View Source
const ( AccessKey = "security:token:access" RefreshKey = "security:token:refresh" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache 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
}
Cache is the interface for caching the Authenticator token.
type StorageOption ¶
type StorageOption = func(*cacheStorage)
func WithCache ¶
func WithCache(c storageiface.Cache) StorageOption
Click to show internal directories.
Click to hide internal directories.