utils

package
v0.0.0-...-eddf04e Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckHashPassword

func CheckHashPassword(password string, hash string) bool

func HashPassword

func HashPassword(password string) string

Types

type JwtWrapper

type JwtWrapper struct {
	SecretKey       string
	Issuer          string
	ExpirationHours int64
}

func (*JwtWrapper) GenerateToken

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

func (*JwtWrapper) ValidateToken

func (w *JwtWrapper) 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