sessions

package
v0.0.0-...-da644f5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSession

func GenerateSession(w http.ResponseWriter, r *http.Request, token string) error

GenerateSession generates a session based off a JWT-token

func IsUserAllowed

func IsUserAllowed(r *http.Request, w http.ResponseWriter, requirements ...string) (bool, user.User)

IsUserAllowed determines if the currently logged in user meets a set of requirements

func Logout

func Logout(w http.ResponseWriter, r *http.Request) error

Logout allows for a user to logout and destroy their session

func ParseSessions

func ParseSessions(r *http.Request, w http.ResponseWriter) (user.User, error)

ParseSessions takes a http request, extracts the session data from it, parses it and returns a user object

Types

This section is empty.

Jump to

Keyboard shortcuts

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