sessions

package
v0.0.0-...-5ac18db Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store = sessions.NewCookieStore([]byte(os.Getenv("CICERONE_SESSION_KEY")))

Store the cookie store which is going to store session data in the cookie The Store key must be stored in the enviroment variable "SESSION_KEY"

Functions

func GetCurrentUser

func GetCurrentUser(r *http.Request) string

GetCurrentUser returns the email of the logged in user

func IsLoggedIn

func IsLoggedIn(r *http.Request) bool

IsLoggedIn will check if the user has an active session and return True

Types

This section is empty.

Jump to

Keyboard shortcuts

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