memory

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package memory implements a session store in-memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store stores the login/registration session in-memory.

In production, you should use a Redis or ETCD, or any distributed Key-Value database. Because of this, you cannot create replicas.

func NewStore

func NewStore() *Store

NewStore instanciates a session store in memory.

func (*Store) Get

func (s *Store) Get(_ context.Context, userID []byte) (*webauthn.SessionData, error)

Get the login or registration session.

func (*Store) Save

func (s *Store) Save(_ context.Context, session *webauthn.SessionData) error

Save the login or registration session.

Jump to

Keyboard shortcuts

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