utils

package
v0.0.0-...-96cd04c Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Address string

Functions

func CheckPasswordHash

func CheckPasswordHash(password string, hash string) bool

func EmailVerificationHTML

func EmailVerificationHTML(email, secret string) string

func GenHash

func GenHash() []rune

func GetUUID

func GetUUID() string

func HashPassword

func HashPassword(password string) string

func PublicIP

func PublicIP() string

func ResetPasswordTemplate

func ResetPasswordTemplate(firstName, LastName, secret string, id int64) string

Types

type JwtWrapper

type JwtWrapper struct {
	SecretKey       string
	Issuer          string
	ExpirationHours int64
}

func (*JwtWrapper) GenerateToken

func (w *JwtWrapper) GenerateToken(user models.TheMonkeysUser) (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