authsessions

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configs = configset.Set[Config]{
	Default: &Config{
		SameSite: http.SameSiteNoneMode,
		Secure:   true,
	},
	Dev: &Config{
		Secure:     false,
		SameSite:   http.SameSiteLaxMode,
		CookieKeys: "0000000000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000",
	},
}

Functions

func NewSessionData added in v0.8.9

func NewSessionData(user sdktypes.User) sessionData

Types

type Config

type Config struct {
	SameSite   http.SameSite
	CookieKeys string `koanf:"cookie_keys"` // pairs of hash and block keys.
	Domain     string `koanf:"ui_domain"`
	Secure     bool
}

type Store

type Store interface {
	Set(http.ResponseWriter, *sessionData) error
	Get(*http.Request) (*sessionData, error)
	Delete(http.ResponseWriter)
}

func New

func New(cfg *Config) (Store, error)

Jump to

Keyboard shortcuts

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