middleware

package
v0.0.0-...-1927dbb Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Auth = func() gin.HandlerFunc {
	return func(c *gin.Context) {
		u, e := util.Authentication(c.Request)
		if e != nil {
			c.AbortWithError(http.StatusUnauthorized, e)
			return
		}

		c.Set("user", u)
	}
}

Auth defines JWT authentication middleware.

View Source
var XSS = xssMw.RemoveXss

XSS defines Xss middleware.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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