auth

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJwtToken

func GenerateJwtToken(secret string, expire int64, user interface{}, issuer string) (string, error)

GenerateJwtToken 生成jwt token

Types

type JwtPayload

type JwtPayload struct {
	User interface{} `json:"user"`
	jwt.StandardClaims
}

func ParseJwtToken

func ParseJwtToken(jwtToken string, secret string) (*JwtPayload, error)

ParseJwtToken 解析 jwt token

Jump to

Keyboard shortcuts

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