sessionHandler

package
v0.0.0-...-1124c96 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckActiveSession

func CheckActiveSession(r *http.Request) ([]util.UserData, bool)

CheckActiveSession queries the DB for the current users data, checks the cookie for corresponding data and returns true if the data is as expected, else returns false.

func CreateSession

func CreateSession(w http.ResponseWriter, username string) util.UserData

func DestroySession

func DestroySession(w http.ResponseWriter, user []util.UserData)

DestroySession destroys an existing session before logging the user out

func GetActiveSession

func GetActiveSession(username string) util.UserData

Returns the active session after CheckActiveSession confirms that the data existing in the DB is consistent user data.

func SessionHandlerNew

func SessionHandlerNew(w http.ResponseWriter, r *http.Request, username string, decider string)

Types

type Email

type Email struct {
	Body      string
	From_addr string
	To_addr   string
	Inbox     int
	Sent      int
}

Jump to

Keyboard shortcuts

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