utils

package
v0.0.0-...-66263c1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEmail

func CheckEmail(word string) error

func CheckPassword

func CheckPassword(word string) error

func CheckUsername

func CheckUsername(word string) error

func ExtractToken

func ExtractToken(r *http.Request) (string, error)

func ExtractTokenMetaData

func ExtractTokenMetaData(r *http.Request) (*models.TokenMetaData, error)

func GenerateToken

func GenerateToken(id int) (*models.LoginResponse, error)

func HashedPassword

func HashedPassword(password string) (string, error)

func TokenValid

func TokenValid(r *http.Request) (jwt.MapClaims, error)

func VerifyPassword

func VerifyPassword(hashedPassword string, candidatePassword string) error

func VerifyToken

func VerifyToken(r *http.Request) (*jwt.Token, error)

func VerifyUser

func VerifyUser(id int, r *http.Request) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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