Documentation
¶
Index ¶
- type AuthCache
- func (c *AuthCache) Clear()
- func (c *AuthCache) Enabled() bool
- func (c *AuthCache) Stats() (int64, int64, int)
- func (c *AuthCache) VerifyKey(ctx context.Context, keyID, plainKey, storedHash string) (bool, error)
- func (c *AuthCache) VerifyPassword(ctx context.Context, userID, password, storedHash string) (bool, error)
- type AuthCacheConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCache ¶
type AuthCache struct {
// contains filtered or unexported fields
}
AuthCache provides caching for password verification results to avoid expensive argon2id re-computation on every request.
func NewAuthCache ¶
func NewAuthCache(cfg AuthCacheConfig) *AuthCache
NewAuthCache creates a new authentication cache.
type AuthCacheConfig ¶
AuthCacheConfig holds configuration for the auth cache.
Click to show internal directories.
Click to hide internal directories.