jwt_helper

package
v0.0.0-...-f43f97b Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 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 *jwt.Token, secret string) string

Types

type DecodedToken

type DecodedToken struct {
	Iat    int      `json:"iat"`
	Roles  []string `json:"roles"`
	UserId string   `json:"userId"`
	Email  string   `json:"email"`
	Iss    string   `json:"iss"`
}

func VerifyToken

func VerifyToken(token string, secret string) *DecodedToken

Jump to

Keyboard shortcuts

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