middleware

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorWare

func AuthorWare(options *AuthorWareOptions, jwt utils.JwtToken, rule *utils.JwtTarget) func(ctx *gin.Context)

func GinCors

func GinCors(headers ...string) gin.HandlerFunc

GinCors gin跨域插件

Types

type AuthorWareOptions

type AuthorWareOptions struct {
	// SaveParamName context存储的键名
	SaveParamName string
	CookieName    string
	HeaderName    string
	FormName      string
	QueryName     string
	Author        utils.BaseAuthor
	Getter        GetAuthorizationFunc
}

type GetAuthorizationFunc added in v0.0.5

type GetAuthorizationFunc func(ctx *gin.Context) (utils.BaseAuthor, error)

Jump to

Keyboard shortcuts

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