session

package
v0.0.0-...-614d85d Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CookieName = "pion-session"

Variables

View Source
var (

	// TODO Use a KV-backed session store
	CookieStore = sessions.NewCookieStore(authnKey, encryptionKey)
)

Functions

func Clear

func Clear(c echo.Context) error

Clear the current session

func Create

func Create(c echo.Context, userInfo *multi_tenant.UserInfo) error

Create generates a new authenticated session for given username

func Get

func Get(c echo.Context) (*sessions.Session, error)

func GetUserInfo

func GetUserInfo(c echo.Context) (*multi_tenant.UserInfo, error)

GetUserInfo extracts userInfo object from the server session

func Validate

func Validate(next echo.HandlerFunc) echo.HandlerFunc

Validate is the middleware to check if attached cookie in the request is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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