sessionstore

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRedisNotConfigured = errors.New("redis is not configured: authentication is disabled until it is")

Functions

func RedisConfigured

func RedisConfigured() bool

Types

type Store

type Store struct {
	DB             func() *sql.DB
	MySQL          bool
	StartedFromNow bool
}

func (*Store) Alive

func (s *Store) Alive(ctx context.Context, userID int64, sid string) (bool, error)

func (*Store) Find

func (s *Store) Find(ctx context.Context, hash string) (session.RefreshRecord, error)

func (*Store) Revoke

func (s *Store) Revoke(ctx context.Context, userID int64, sid string) error

func (*Store) RevokeAll

func (s *Store) RevokeAll(ctx context.Context, userID int64, except string) ([]string, error)

func (*Store) Rotate

func (s *Store) Rotate(ctx context.Context, _ session.RefreshRecord, oldHash, newHash string, userID int64, sid string, newExpiry time.Time) (bool, error)

Jump to

Keyboard shortcuts

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