tokens

package
v0.0.0-...-ed50d38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JWT_SECRET []byte

Functions

func CreateForgotLink(universityID string) (link string, user *models.User, err error)

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

func ResetPassword(tokenString, newPassword string) error

this function first verifies that the token is valid If valid, it changes the password. If not, it returns an error

func VerifyToken

func VerifyToken(c *gin.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL