jwt

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(claim CustomClaims, secret string) (string, error)

Types

type CustomClaims

type CustomClaims struct {
	Category string `json:"category"`
	Id       string `json:"id"`
	Issuer   string `json:"issuer"`
	jwt.RegisteredClaims
}

func NewCustomClaims

func NewCustomClaims(category, id, issuer, validDuration string) CustomClaims

func VerifyToken

func VerifyToken(tokenString string, secret string) (*CustomClaims, error)

Jump to

Keyboard shortcuts

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