jwt

package module
v0.0.0-...-30b0e53 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MulanPSL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token interface {
	TokenHandler(id string, time time.Duration) (string, error)
	GetToken(tokenString string) (jwt.MapClaims, string)
}

type TokenConfig

type TokenConfig struct {
	APP_KEY string
	// contains filtered or unexported fields
}

func TokenNewInit

func TokenNewInit(APP_KEY string, times int) TokenConfig

func (TokenConfig) AuthMiddle

func (t TokenConfig) AuthMiddle() http.HandlerFunc

中间件

func (TokenConfig) GetToken

func (t TokenConfig) GetToken(tokenString string) (jwt.MapClaims, string)

解析token

func (TokenConfig) TokenHandler

func (t TokenConfig) TokenHandler(id string) (string, error)

TokenHandler是我们获取用户名和密码的处理程序,如果有效,则返回用于将来请求的令牌。

Jump to

Keyboard shortcuts

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