Documentation
¶
Index ¶
- type KV
- type SIWSCache
- func (c *SIWSCache) Consume(ctx context.Context, nonce string) (siws.ChallengeData, bool, error)
- func (c *SIWSCache) Del(ctx context.Context, nonce string) error
- func (c *SIWSCache) Get(ctx context.Context, nonce string) (siws.ChallengeData, bool, error)
- func (c *SIWSCache) Put(ctx context.Context, nonce string, data siws.ChallengeData) error
- type StateCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
KV is a Redis-backed ephemeral key-value store with TTL support.
type SIWSCache ¶
type SIWSCache struct {
// contains filtered or unexported fields
}
SIWSCache stores pending SIWS challenges in Redis.
func NewSIWSCache ¶
NewSIWSCache creates a new Redis-backed SIWS challenge cache.
func (*SIWSCache) Consume ¶ added in v0.39.0
Consume atomically retrieves and deletes a challenge (single-use). Redis GETDEL guarantees only one concurrent caller receives the value, so a replayed SIWS signature can't reuse the same nonce within the challenge TTL.
type StateCache ¶
type StateCache struct {
// contains filtered or unexported fields
}
func NewStateCache ¶
Click to show internal directories.
Click to hide internal directories.