Documentation ¶
Index ¶
- Variables
- func CheckUserType(c *gin.Context, role string) (err error)
- func GenerateAllTokens(email string, firstName string, lastName string, userType string, uid string) (signedToken string, signedRefreshToken string, err error)
- func MatchUserTypeToUid(c *gin.Context, userId string) (err error)
- func UpdateAllTokens(signedToken string, signedRefreshToken string, userId string)
- type SignedDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var SECRET_KEY string = os.Getenv("SECRET_KEY")
Functions ¶
func GenerateAllTokens ¶
func UpdateAllTokens ¶
Types ¶
type SignedDetails ¶
type SignedDetails struct { Email string First_name string Last_name string Uid string User_type string jwt.StandardClaims }
func ValidateToken ¶
func ValidateToken(signedToken string) (claims *SignedDetails, msg string)
Click to show internal directories.
Click to hide internal directories.