redisstore

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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.

func NewKV

func NewKV(rdb *redis.Client) *KV

func (*KV) Del

func (k *KV) Del(ctx context.Context, key string) error

func (*KV) Get

func (k *KV) Get(ctx context.Context, key string) ([]byte, bool, error)

func (*KV) Set

func (k *KV) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error

type SIWSCache

type SIWSCache struct {
	// contains filtered or unexported fields
}

SIWSCache stores pending SIWS challenges in Redis.

func NewSIWSCache

func NewSIWSCache(rdb *redis.Client, keyPrefix string, ttl time.Duration) *SIWSCache

NewSIWSCache creates a new Redis-backed SIWS challenge cache.

func (*SIWSCache) Del

func (c *SIWSCache) Del(ctx context.Context, nonce string) error

Del removes a challenge from Redis.

func (*SIWSCache) Get

func (c *SIWSCache) Get(ctx context.Context, nonce string) (siws.ChallengeData, bool, error)

Get retrieves a challenge from Redis.

func (*SIWSCache) Put

func (c *SIWSCache) Put(ctx context.Context, nonce string, data siws.ChallengeData) error

Put stores a challenge in Redis.

type StateCache

type StateCache struct {
	// contains filtered or unexported fields
}

func NewStateCache

func NewStateCache(rdb *redis.Client, keyPrefix string, ttl time.Duration) *StateCache

func (*StateCache) Del

func (s *StateCache) Del(ctx context.Context, state string) error

func (*StateCache) Get

func (s *StateCache) Get(ctx context.Context, state string) (oidckit.StateData, bool, error)

func (*StateCache) Put

func (s *StateCache) Put(ctx context.Context, state string, data oidckit.StateData) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL