jwt

package
v0.0.0-...-dd3d275 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware() middleware.Middleware

根据header读取jwt token

func DestroyToken

func DestroyToken(token string) bool

func GenerateToken

func GenerateToken(id int64, username string) (string, error)

Types

type Claims

type Claims struct {
	UserId   int64
	Username string
	jwt.StandardClaims
}

func ParseToken

func ParseToken(token string) (*Claims, error)

Jump to

Keyboard shortcuts

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