Documentation ¶
Index ¶
- Variables
- func CheckUserType(ctx *gin.Context, role string) error
- func GenerateAllTokens(email string, firstName string, lastName string, userType string, ...) (signedToken string, signedRefreshToken string, err error)
- func MatchUserTypeToUid(ctx *gin.Context, userId string) 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 FirstName string LastName string UserId string UserType string jwt.StandardClaims }
func ValidateToken ¶
func ValidateToken(signedToken string) (claims *SignedDetails, msg string)
Click to show internal directories.
Click to hide internal directories.