cookie

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Admin

func Admin(home string) gin.HandlerFunc

Admin Middleware which ensures the user accessing the route must be an admin, should be called after CookieEnsureAuthed

func Auth

func Auth(s *server.Server) gin.HandlerFunc

Auth middleware which ensures the user is authorised

func SkipIfAuthed

func SkipIfAuthed(session *auth.Session, home string) gin.HandlerFunc

SkipIfAuthed Middleware which skips these routes if the user is already authorised and redirect to the home page instead

Types

This section is empty.

Jump to

Keyboard shortcuts

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