utils

package
v0.0.0-...-64ec3fa Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(hashedPassword, password string) error

func ConnectDB

func ConnectDB() (*gorm.DB, error)

func CreateJWT

func CreateJWT(username string) (string, error)

func ExtractJWT

func ExtractJWT(r *http.Request) string

func ExtractUsernameFromToken

func ExtractUsernameFromToken(r *http.Request) (string, error)

func Hash

func Hash(password string) (string, error)

func Sanitize

func Sanitize(data string) string

func VerifyJWT

func VerifyJWT(r *http.Request) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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