dgrijalva

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCode added in v0.0.2

func GenerateCode(len int) string

GenerateCode return an integer code with given len

func GenerateForgetPasswordCode added in v0.0.2

func GenerateForgetPasswordCode(length int) string

GenerateForgetPasswordCode generate a code contains digit and texts

func GenerateHashToken added in v0.0.2

func GenerateHashToken(salt string) string

func GenerateToken

func GenerateToken(secretKey string, claims map[string]interface{}, expireDuration time.Duration) (accessToken string, expiration int64, err error)

func GenerateUUID added in v0.0.2

func GenerateUUID() string

func ValidateToken

func ValidateToken(secretKey string, token string) ([]byte, error)

func ValidateWithClaim

func ValidateWithClaim(secretKey string, token string, claim jwt.Claims) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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