Documentation
¶
Index ¶
- func CheckPassword(plain string, hashed string) bool
- func CreateUser(ctx context.Context, client neo4j.SessionWithContext, data map[string]any) error
- func GenerateToken(userId string, key string) (string, error)
- func GetUserByEmailAndPassword(ctx context.Context, client neo4j.SessionWithContext, email string, ...) (models.User, error)
- func HashAndSalt(password string) (string, error)
- func ValidateEmail(email string) bool
- func ValidatePassword(password string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
check if plain string password is the equivalent of a given hash
func CreateUser ¶
func GenerateToken ¶
generar un jwt con el user id almacenado dentro
func HashAndSalt ¶
hash and salt plain string password, returns the hashed password
func ValidateEmail ¶
validate through REGEX if a string is a valid email address
func ValidatePassword ¶
checks if a string has at least 8 characters at least 1 number and at least one uppercase
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.