routermiddleware

package
v0.0.0-...-c477d60 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: GPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIAuth

func APIAuth() gin.HandlerFunc

APIAuth todo...

func CheckCsrfToken

func CheckCsrfToken() gin.HandlerFunc

CheckCsrfToken adds a middleware that checks csrf token

func HeadersCors

func HeadersCors() gin.HandlerFunc

HeadersCors enables CORS

func HeadersNoCache

func HeadersNoCache() gin.HandlerFunc

HeadersNoCache adds no cache headers to the request

func Session

func Session() gin.HandlerFunc

Session starts session

func SessionMustAuth

func SessionMustAuth() gin.HandlerFunc

SessionMustAuth ensures user is authenticated

func SessionSetUser

func SessionSetUser(userService datatype.UserService) gin.HandlerFunc

SessionSetUser sets user on context

func SetCsrfToken

func SetCsrfToken() gin.HandlerFunc

SetCsrfToken sends csrf token to user

Types

This section is empty.

Jump to

Keyboard shortcuts

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