sjwt

package
v0.0.0-...-368a27e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckToken

func CheckToken(ss string) (name string, id, regionid int)

校验token是否有效,并返回信息

func GenMD5

func GenMD5(pwd string) string

密码加密

func GenToken

func GenToken(name string, id, regionid int) string

产生json web token

Types

type MyCustomClaims

type MyCustomClaims struct {
	Username string `json:"username"`
	UserID   int    `json:userid`
	// 区域ID??
	RegionId int `json:"regionid"`
	// ?????
	jwt.StandardClaims
}

自定义声明??

Jump to

Keyboard shortcuts

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