jwtHelper

package
v0.0.0-...-d4ad7b1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(username, password string) (string, error)

JWT加密生成并返回令牌 param username param password return string,error

Types

type Claims

type Claims struct {
	UserName string
	Password string
	jwt.StandardClaims
}

func ParseToken

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

JWT解析令牌并验证 param tokenStr retrun *Claims, error

Jump to

Keyboard shortcuts

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