Documentation ¶
Index ¶
- func EncryptPassword(password string) string
- func GenerateConfirmHash() (string, error)
- func GenerateJWT(userID interface{}, signingKey string, expiresIn time.Duration) (string, error)
- func GenerateRandomPassword(length int) string
- func VerifyJWT(theToken string, signingKey string) (map[string]interface{}, error)
- func VerifyPassword(password, hashedPassword string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncryptPassword ¶
EncryptPassword is used to encrypt a password using bcrypt
func GenerateConfirmHash ¶
GenerateConfirmHash generates a hash that can be used in for example password confirm mails
func GenerateJWT ¶
GenerateJWT generates JWT token, based on roleID and userID
func GenerateRandomPassword ¶
GenerateRandomPassword is used to generate a random password based on letters from the letters variable and specified length
func VerifyPassword ¶
VerifyPassword is used to compare password against hash in db
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.