session

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 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 CookieSession

type CookieSession struct {
	*auth.BaseSession
	// contains filtered or unexported fields
}

CookieSession wraps BaseSession for cookie storage

func (*CookieSession) Save

Save saves session to cookie

type CookieStore

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

CookieStore implements SessionStore using encrypted cookies

func NewCookieStore

func NewCookieStore(config auth.SessionConfig, encryptor crypto.Encryptor) (*CookieStore, error)

NewCookieStore creates a new cookie session store with an injected encryptor.

func (*CookieStore) Create

func (s *CookieStore) Create(id string) (auth.Session, error)

Create creates a new session

func (*CookieStore) Destroy

func (s *CookieStore) Destroy(id string) error

Destroy destroys session

func (*CookieStore) GarbageCollect

func (s *CookieStore) GarbageCollect(maxLifetime time.Duration) error

GarbageCollect performs garbage collection (not needed for cookies)

func (*CookieStore) Get

func (s *CookieStore) Get(r *http.Request, id string) (auth.Session, error)

Get gets session from request

func (*CookieStore) Save

func (s *CookieStore) Save(w http.ResponseWriter, session auth.Session) error

Save saves session to cookie

Jump to

Keyboard shortcuts

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