auth

package
v0.0.0-...-9b264be Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GenerateToken

func GenerateToken(user models.User) (signedToken string, err error)

func HashPassword

func HashPassword(pass string) string

Types

type JwtClaims

type JwtClaims struct {
	*jwt.RegisteredClaims
	Id       int64
	Username string
	Role     string
}

func ValidateToken

func ValidateToken(signedToken string) (claims *JwtClaims, err error)

Jump to

Keyboard shortcuts

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