jwt

package
v0.0.0-...-97b7911 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(claims CustomClaims, signingKey string) (string, error)

Types

type CustomClaims

type CustomClaims struct {
	ID    uint   `json:"id"`
	Emial string `json:"email"`
	Role  string `json:"role"`
	jwt.StandardClaims
}

func VerifyToken

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

Jump to

Keyboard shortcuts

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