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, uid string) (signedToken string, signedRefreshtoken string, err error)
GenerateAllTokens generates both the detailed token and refresh token
func UpdateAllTokens ¶
UpdateAllTokens renews the user tokens when they login
Types ¶
type SignedDetails ¶
type SignedDetails struct { Email string First_name string Last_name string Uid string jwt.StandardClaims }
SignedDetails
func ValidateToken ¶
func ValidateToken(signedToken string) (claims *SignedDetails, msg string)
ValidateToken validates the jwt token
Click to show internal directories.
Click to hide internal directories.