authsessions

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Configs = configset.Set[Config]{
	Default: &Config{
		Cookie: func() *sessions.CookieConfig {
			c := sessions.DefaultCookieConfig
			c.SameSite = http.SameSiteNoneMode
			return c
		}(),
	},
	Dev: &Config{
		Cookie:     sessions.DebugCookieConfig,
		CookieKeys: "0000000000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000",
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Cookie     *sessions.CookieConfig
	CookieKeys string `koanf:"cookie_keys"` // pairs of hash and block keys.
}

type SessionData

type SessionData struct {
	User sdktypes.User
}

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