middleware

package
v0.0.0-...-fa598d4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticator

func Authenticator(c *gin.Context, LoginType int) (interface{}, error)

func AuthenticatorOAuth

func AuthenticatorOAuth(c *gin.Context) (interface{}, error)

func Cors

func Cors() gin.HandlerFunc

func GetLang

func GetLang() string

func InitLang

func InitLang()

func JwtAuth

func JwtAuth(LoginType int) *jwt.GinJWTMiddleware

todo : 用单独的claims model去掉user model

func JwtPrepare

func JwtPrepare(c *gin.Context)

JwtPrepare : parse jwt and set login session info

func LoginResponse

func LoginResponse(c *gin.Context, code int, token string, expire time.Time)

func PermCheck

func PermCheck(c *gin.Context)

PermCheck - check permission automatically

func SetLangVer

func SetLangVer() gin.HandlerFunc

*

设置语言

Types

This section is empty.

Jump to

Keyboard shortcuts

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