helpers

package
v0.0.0-...-718e760 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(plain string, hashed string) bool

check if plain string password is the equivalent of a given hash

func CreateUser

func CreateUser(ctx context.Context, client neo4j.SessionWithContext, data map[string]any) error

func GenerateToken

func GenerateToken(userId string, key string) (string, error)

generar un jwt con el user id almacenado dentro

func GetUserByEmailAndPassword

func GetUserByEmailAndPassword(
	ctx context.Context,
	client neo4j.SessionWithContext,
	email string,
	password string,
) (models.User, error)

func HashAndSalt

func HashAndSalt(password string) (string, error)

hash and salt plain string password, returns the hashed password

func ValidateEmail

func ValidateEmail(email string) bool

validate through REGEX if a string is a valid email address

func ValidatePassword

func ValidatePassword(password string) bool

checks if a string has at least 8 characters at least 1 number and at least one uppercase

Types

This section is empty.

Jump to

Keyboard shortcuts

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