jwt

package
v0.0.0-...-132f7fb Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SignUser = "ironhead"
	SignKey  = "my_sign_key" // 加密用的秘钥,不能泄漏
)

Variables

This section is empty.

Functions

func Decode

func Decode(tokenString string) (string, error)

func Encode

func Encode(msg string) (string, error)

Types

type MyCustomClaims

type MyCustomClaims struct {
	Msg string `json:"msg,omitempty"` //自定义字段
	jwt.StandardClaims
}

Jump to

Keyboard shortcuts

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