jwt

package
v2.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(tokenString string, appName string, appSecret string) (interface{}, error)

JwtParseUser parsing token

Types

type Claims

type Claims struct {
	User interface{}
	jwt.StandardClaims
}

type JwtObj

type JwtObj struct {
	Key      string  `json:"key"`
	Token    string  `json:"token"`
	ExpireTs int64   `json:"expire"`
	Alive    float64 `json:"alive"`
}

func GenerateToken

func GenerateToken(m interface{}, appName string, appSecret string, key string, expireHour int) (*JwtObj, error)

GenerateToken generate tokens used for auth

Jump to

Keyboard shortcuts

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