helpers

package
v0.0.0-...-1b8c1d8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SECRET_KEY string = os.Getenv("SECRET_KEY")

Functions

func GenerateAllTokens

func GenerateAllTokens(email string, firstName string, lastName string, user_id string) (signedToken string, signedRefreshToken string, err error)

func IsAdmin

func IsAdmin(email string) bool

func UpdateAllTokens

func UpdateAllTokens(signedToken string, signedRefreshToken string, user_id string)

Types

type SignedDetails

type SignedDetails struct {
	Email      string
	First_name string
	Last_name  string
	User_id    string
	jwt.StandardClaims
}

func ValidateToken

func ValidateToken(signedToken string) (claims *SignedDetails, err error)

Jump to

Keyboard shortcuts

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