session

package
v0.0.0-...-08d4403 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Store will hold all session data
	Store *sessions.CookieStore // TODO: Move to token based authentication in future
	// CookieName cookie key which will be used to get the session from store
	CookieName string = "cookie-name"
)

Functions

func Init

func Init(sessionAuthKey string)

Init session store

Types

type UserSession

type UserSession struct {
	UserID          string `json:"userID"`
	AccessToken     string `json:"accessToken"`
	IsAuthenticated bool   `json:"isAuthenticated"`
}

UserSession struct to store user session details

Jump to

Keyboard shortcuts

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