tokens

package
v0.0.0-...-8d7a104 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GenerateTokens

func GenerateTokens(email, firstName, lastName, userID string) (signedToken, signedRefreshToken string, err error)

func UpdateAllTokens

func UpdateAllTokens(signedToken, signedRefreshToken, userID string)

Types

type SignedDetails

type SignedDetails struct {
	Email     string
	FirstName string
	LastName  string
	UserID    string
	jwt.RegisteredClaims
}

func ValidateToken

func ValidateToken(signedToken string) (claims *SignedDetails, msg string)

Jump to

Keyboard shortcuts

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