helper

package
v0.0.0-...-6cc2e2a Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanJWT

func CleanJWT(tokenString string) (string, error)

func VerifyAPIKey

func VerifyAPIKey(keyPlainText string) bool

Types

type JWT_INFO

type JWT_INFO struct {
	Email     string    `json:"email"`
	IsAdmin   bool      `json:"isAdmin"`
	ExpiredAt time.Time `json:"expiry"`
}

func VerifyJWT

func VerifyJWT(tokenString string) (bool, JWT_INFO, error)

VerifyJWT - decrypts JWT to make sure its valid and also checks whether it is past its expiry or not

Jump to

Keyboard shortcuts

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