jwt

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HS256 = "HS256"
)

Variables

This section is empty.

Functions

func GetPayload

func GetPayload(token string) ([]byte, error)

GetPayload 获取负载信息

func Sign

func Sign(payload interface{}) (ret string, err error)

Sign 签名

func Verify

func Verify(token string) (err error)

Verify 验签

Types

type Instance

type Instance struct {
	//jwt密钥
	Secret string `yaml:"secret"`
}

func (*Instance) GetName

func (i *Instance) GetName() string

func (*Instance) Load

func (i *Instance) Load() error

Jump to

Keyboard shortcuts

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