Documentation
¶
Index ¶
Constants ¶
View Source
const (
// SubNamespace is the plugin sub-namespace within GoModularAuth cache keys.
SubNamespace = "anonymous"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache wraps the core cache adapter for anonymous identity caching.
func New ¶
New creates a new Cache wrapper. If core is nil, the cache operates in no-op/degraded mode.
func (*Cache) DeleteIdentity ¶
DeleteIdentity invalidates the cached anonymous identity for a user.
func (*Cache) GetIdentity ¶
GetIdentity retrieves an anonymous identity from cache by Core User ID.
func (*Cache) SetIdentity ¶
SetIdentity stores an anonymous identity in cache with a TTL.
type CachedIdentity ¶
type CachedIdentity struct {
ID string `json:"id"`
UserID string `json:"user_id"`
ExpiresAt time.Time `json:"expires_at"`
ConvertedAt *time.Time `json:"converted_at,omitempty"`
LinkedUserID string `json:"linked_user_id,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
CachedIdentity represents the cached anonymous identity.
func (*CachedIdentity) Converted ¶
func (i *CachedIdentity) Converted() bool
Converted reports whether the identity has been converted.
Click to show internal directories.
Click to hide internal directories.