Documentation ¶
Index ¶
- Variables
- func CheckUserType(ctx *gin.Context, role string) (err error)
- func GenerateTokens(email string, firstName string, lastName string, userType string, uid string) (accessToken string, refreshToken string, err error)
- func MatchUserTypeToUId(ctx *gin.Context, userId string) (err error)
- func UpdateTokens(accessToken string, refreshToken string, userId string)
- type SignedDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var SECRET_KEY string = os.Getenv("SECRET_KEY")
Functions ¶
func GenerateTokens ¶
func UpdateTokens ¶
Types ¶
type SignedDetails ¶
type SignedDetails struct { Email string FirstName string LastName string Uid string UserType string jwt.RegisteredClaims }
func ValidateToken ¶
func ValidateToken(accessToken string) (claims *SignedDetails, msg string)
Click to show internal directories.
Click to hide internal directories.