sessiontest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionManager

type SessionManager struct {
	CreateFunc     func(context.Context, auth.Identity) (auth.Session, error)
	CreateCalls    int
	CreateIdentity auth.Identity
	ValidateFunc   func(context.Context, string) (auth.Session, error)
	ValidateCalls  int
	ValidateToken  string
	RevokeFunc     func(context.Context, string) error
	RevokeCalls    int
	RevokeToken    string
}

SessionManager is a reusable test double for authsession.SessionManager.

func (*SessionManager) Create

func (m *SessionManager) Create(ctx context.Context, identity auth.Identity) (auth.Session, error)

func (*SessionManager) Revoke

func (m *SessionManager) Revoke(ctx context.Context, token string) error

func (*SessionManager) Validate

func (m *SessionManager) Validate(ctx context.Context, token string) (auth.Session, error)

Jump to

Keyboard shortcuts

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