Documentation
¶
Index ¶
- Variables
- func CreateForgotLink(universityID string) (link string, user *models.User, err error)
- func CreateSignInToken(userID uint, universityID string, isTeacher bool, name string, email string) (string, error)
- func LoadPrivateKey() error
- func ResetPassword(tokenString, newPassword string) error
- func VerifyToken(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var JWT_SECRET []byte
Functions ¶
func CreateForgotLink ¶
func CreateSignInToken ¶
func CreateSignInToken(userID uint, universityID string, isTeacher bool, name string, email string) (string, error)
this function creates a token on sign in. All subsequent authorized requests must use this token
func LoadPrivateKey ¶
func LoadPrivateKey() error
func ResetPassword ¶
this function first verifies that the token is valid If valid, it changes the password. If not, it returns an error
func VerifyToken ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.