jwtx

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(key string, jwtClaims *JwtClaims) (string, error)

Types

type JwtClaims

type JwtClaims struct {
	jwt.RegisteredClaims
	AppId     int `json:"appId"`
	AccountId int `json:"accountId"`
}

func NewJwtClaims

func NewJwtClaims(id, issuer, appName, email string, duration time.Duration, appId, accountId uint32) *JwtClaims

func VerifyToken

func VerifyToken(key string, accessToken string) (jwtClaims *JwtClaims, err error)

Jump to

Keyboard shortcuts

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