middlewares

package
v0.0.0-...-cf27cac Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthHandler

func AuthHandler() gin.HandlerFunc

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GenerateToken

func GenerateToken(username string, uniqueKey string) (string, interface{}, error)

func GetUsername

func GetUsername() string

func HashPassword

func HashPassword(password string) (string, error)

func RandomStr

func RandomStr(n int) string

func ValidateToken

func ValidateToken(t string, k string) (*jwt.Token, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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