jwt

package
v0.0.0-...-e964040 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserClaims

func UserClaims(ctx *gin.Context) (*jwtauth.UserClaims, error)

UserClaims .

Types

type Interceptor

type Interceptor struct {
	// Enabled true: 使用 Interceptor 规则; false: 不使用 Interceptor 规则, 全部路由进行 token 校验
	Enabled bool `yaml:"enabled"`

	// Includes 进行 token 校验。优先级:高
	Includes []string `yaml:"includes"`

	// Excludes 不进行 token 校验。优先级:低
	Excludes []string `yaml:"excludes"`
	// contains filtered or unexported fields
}

Interceptor uri 拦截器

type JwtHandler

type JwtHandler struct {
	Interceptor *Interceptor
	Handler     func(ctx *gin.Context) bool
}

JwtHandler .

func New

func New(opts ...func(j *JwtHandler)) *JwtHandler

New .

func (*JwtHandler) HandlerFunc

func (j *JwtHandler) HandlerFunc() gin.HandlerFunc

HandlerFunc .

Jump to

Keyboard shortcuts

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