helpers

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(username string, secretKey []byte) (string, error)

Function to create JWT tokens with claims

func GetSecret

func GetSecret() []byte

func GetValidate

func GetValidate() *validator.Validate

func HashPassword

func HashPassword(password string) (string, error)

func ParseToken

func ParseToken(tokenString string, secretKey []byte) (*jwt.Token, error)

func RandomString

func RandomString(length int) string

func VerifyPassword

func VerifyPassword(password, hash string) error

func VerifyTokenAndMapClaims

func VerifyTokenAndMapClaims(tokenString string, secretKey []byte) (jwt.MapClaims, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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