Help us shape the future of Go! Take the 2026 Go Developer Survey

session

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Legacy

func Legacy(users core.UserStore, config Config) (core.Session, error)

Legacy returns a session manager that is capable of mapping legacy tokens to 1.0 users using a mapping file.

func New

func New(users core.UserStore, config Config) core.Session

New returns a new cookie-based session management.

Types

type Config

type Config struct {
	Secure      bool
	Secret      string
	Timeout     time.Duration
	MappingFile string
}

Config provides the session configuration.

func NewConfig

func NewConfig(secret string, timeout time.Duration, secure bool) Config

NewConfig returns a new session configuration.

Jump to

Keyboard shortcuts

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