middlewares

package
Version: v0.0.0-...-315cdd5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SigningKey = "$SolidSigningKey$"
)

Functions

func AuthHandler

func AuthHandler(authRoles ...string) gin.HandlerFunc

func CORSMiddleware

func CORSMiddleware() gin.HandlerFunc

func GenerateToken

func GenerateToken(key []byte, userId string, username string, roles []string) (string, error)

func ValidateToken

func ValidateToken(tokenString string, key string) (*jwt.Token, error)

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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