Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RedirectCookie = "tanuki-redirect"
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.Instance, action Action) 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 ¶
Click to show internal directories.
Click to hide internal directories.