services

package
v0.0.0-...-d1667da Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

This function checks HASH of the password with the database hash saved

func GetJwtClaims

func GetJwtClaims(userID int, email string) jwt.MapClaims

GetJwtClaims create claims and return for use in JWT

func GetJwtToken

func GetJwtToken(userID int, email string) (string, error)

GetJwtToken creates JWT token from UserID & email address

func HashPassword

func HashPassword(password string) (string, error)

This function creates HASH of the password using bcrypt

func VerifyJwtToken

func VerifyJwtToken(token string) (map[string]string, bool)

ValidateJwtToken as name suggests validates JWT Token

func VerifyUserPassword

func VerifyUserPassword(password string, passwordHash string) (string, bool)

ValidateLoginCredentials checks if username and password is correct If password is verified then an integer other than zero is returned

Types

This section is empty.

Jump to

Keyboard shortcuts

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