utils

package
v0.0.0-...-fdc88a6 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash verifies password

func GenerateJWTToken

func GenerateJWTToken(userID uint) (string, error)

GenerateJWTToken generates Accesstokens for user

func GetHTTPError

func GetHTTPError(httpCode int, message string, error string) error

GetHTTPError parses the http code, error and message

func HashPassword

func HashPassword(password string) (string, error)

HashPassword creates a password hash

func VerifyJWTToken

func VerifyJWTToken(tokenString string) (*jwt.Token, error)

VerifyJWTToken checks if the JWT token is valid and not expired

Types

This section is empty.

Jump to

Keyboard shortcuts

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