middleware

package
v0.0.0-...-11559a6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors(options ...func(*CorsOptions)) gin.HandlerFunc

func Exception

func Exception(c *gin.Context)

func Jwt

func Jwt(options ...func(*JwtOptions)) gin.HandlerFunc

func JwtLogin

func JwtLogin(options ...func(*JwtOptions)) gin.HandlerFunc

func WithJwtCookieName

func WithJwtCookieName(cookieName string) func(*JwtOptions)

func WithJwtFailWithCodeAndMsg

func WithJwtFailWithCodeAndMsg(fun func(code int, format interface{}, a ...interface{})) func(*JwtOptions)

func WithJwtFailWithMsg

func WithJwtFailWithMsg(fun func(format interface{}, a ...interface{})) func(*JwtOptions)

func WithJwtKey

func WithJwtKey(key string) func(*JwtOptions)

func WithJwtLoginPwdCheck

func WithJwtLoginPwdCheck(fun func(c *gin.Context, r req.LoginCheck) (user models.SysUser, err error)) func(*JwtOptions)

func WithJwtMaxRefresh

func WithJwtMaxRefresh(maxRefresh int) func(*JwtOptions)

func WithJwtPrivateBytes

func WithJwtPrivateBytes(bs []byte) func(*JwtOptions)

func WithJwtRealm

func WithJwtRealm(realm string) func(*JwtOptions)

func WithJwtSendCookie

func WithJwtSendCookie(flag bool) func(*JwtOptions)

func WithJwtSuccess

func WithJwtSuccess(fun func()) func(*JwtOptions)

func WithJwtTimeout

func WithJwtTimeout(timeout int) func(*JwtOptions)

func WithJwtTokenHeaderName

func WithJwtTokenHeaderName(tokenHeaderName string) func(*JwtOptions)

func WithJwtTokenLookup

func WithJwtTokenLookup(tokenLookup string) func(*JwtOptions)

Types

type CorsOptions

type CorsOptions struct {
	// contains filtered or unexported fields
}

type JwtOptions

type JwtOptions struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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