utils

package
v0.0.0-...-ba48316 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 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 string, hash string) bool

func HashPassword

func HashPassword(password string) (string, error)

Types

type JwtWrapper

type JwtWrapper struct {
	SecretKey       string
	Issuer          string
	ExpirationHours int64
}

func (*JwtWrapper) Sign

func (j *JwtWrapper) Sign(user *domain.User) (signedToken string, err error)

func (*JwtWrapper) Validate

func (j *JwtWrapper) Validate(signedToken string) (claims *jwtClaims, err error)

Jump to

Keyboard shortcuts

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