Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func CreateNewUser(firstname string, lastname string, email string, hash string) bool
- func DecryptToken(key []byte, securemess string) (decodedmess string, err error)
- func EncryptToken(key []byte, message string) (encmess string, err error)
- func HashPassword(password string) (string, error)
- func IsLetter(s string) bool
- func RespondWithError(c *gin.Context, code int, message interface{})
- func UserAuthentication() gin.HandlerFunc
- func UserDetails(c *gin.Context)
- func UserLogin(c *gin.Context)
- func UserLogout(c *gin.Context)
- func UserRegistration(c *gin.Context)
- type JWTData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash - Returns true if hash and password matches else returms false
func CreateNewUser ¶
CreateNewUser - Saves new user in DB
func DecryptToken ¶
DecryptToken - Decrypts the user token
func EncryptToken ¶
EncryptToken - Encrypts the user token
func HashPassword ¶
HashPassword - Generates a Hash value for the passord
func RespondWithError ¶
RespondWithError - Error response returner
func UserAuthentication ¶
func UserAuthentication() gin.HandlerFunc
UserAuthentication - middleware to check user authentication
func UserRegistration ¶
UserRegistration - Registers a user account
Types ¶
Click to show internal directories.
Click to hide internal directories.