middleware

package
v0.0.0-...-9ffdc33 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHeaders

func AddHeaders(c *fiber.Ctx)

AddHeaders adds cors headers for the request

func CreateToken

func CreateToken(id uint, email string) (string, error)

CreateToken returns the token and error after signing with HS256

func ValidateToken

func ValidateToken(c *fiber.Ctx, tokenString string) int

ValidateToken validates a token payload

func VerifyToken

func VerifyToken(c *fiber.Ctx)

VerifyToken verifies if the token present in the authorization header is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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