jwt

package
v0.0.0-...-139547c Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sign

func Sign(c Context, secret string) (token string, expiredAt int64, err error)

颁发token

Types

type Context

type Context struct {
	Id       uint
	Nickname string
	Phone    string
}

func Parse

func Parse(token, secret string) (*Context, error)

解析jwt

func ParseRequest

func ParseRequest(c *gin.Context) (*Context, error)

从路由中获取token

Jump to

Keyboard shortcuts

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