jwt

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenJWT

func GenJWT(userId int, loginId, userName, clientId, signKey, profileKey, issuer string, duration time.Duration) (string, error)

Types

type CustomJWTClaims

type CustomJWTClaims struct {
	UserId     int    `json:"userId"`
	LoginId    string `json:"loginId"`
	Username   string `json:"username"`
	ClientId   string `json:"clientId"`
	ProfileKey string `json:"profileKey"`
	jwt.RegisteredClaims
}

func ParseJWT

func ParseJWT(tokenString, signKey string) (*CustomJWTClaims, error)

Jump to

Keyboard shortcuts

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