Documentation
¶
Index ¶
- Variables
- func CheckUserType(c *gin.Context, role string) (err error)
- func EncodeToString(max int) string
- func GenerateAllTokens(email string, firstName string, lastName string, userType string) (signedToken string, signedRefreshToken string, err error)
- func HashPassword(password string) string
- func MatchUserTypeToUid(c *gin.Context, userId string) (err error)
- func UpdateAllTokens(signedToken string, signedRefreshToken string, userEmail string)
- func VerifyPassword(userPassword string, providedPassword string) (bool, string)
- type SignedDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var INTEGER_TABLE = [...]byte{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'}
View Source
var SECRET_KEY string = viper.GetString("jwtKey")
Functions ¶
func EncodeToString ¶
EncodeToString is used to create a 6 digit verification code
func GenerateAllTokens ¶
func HashPassword ¶
HashPassword is used to encrypt the password before storage
func UpdateAllTokens ¶
Types ¶
type SignedDetails ¶
type SignedDetails struct { Email string First_name string Last_name 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.