cookie

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

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

Strategy is the default SessionStrategy: an opaque session ID in an HttpOnly cookie, backed by whatever SessionRepo the consumer injects (authority.Module implements it with its own session table + in-memory cache).

func New

func New(repo user.SessionRepo, cookieName string, ttl int, trustProxy bool) *Strategy

New builds a cookie strategy. cookieName=="" defaults to "session"; ttl==0 defaults to 86400 (seconds).

func (*Strategy) Identify

func (s *Strategy) Identify(ctx router.Context) (string, error)

func (*Strategy) Issue

func (s *Strategy) Issue(ctx router.Context, userID string) error

func (*Strategy) Revoke

func (s *Strategy) Revoke(ctx router.Context) error

Jump to

Keyboard shortcuts

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