auth

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(hashedPassword, password string) bool

func GenerateToken

func GenerateToken(userId int) (string, error)

GenerateToken token generate

func GetUserIDByToken

func GetUserIDByToken(token string) (string, error)

func HashAndSalt

func HashAndSalt(password string) string

func RandomHex

func RandomHex(length int) string

func RandomString

func RandomString(length int) string

func ValidateToken

func ValidateToken(token string) (*jwt.Token, error)

ValidateToken token validate

Types

This section is empty.

Jump to

Keyboard shortcuts

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