middleware

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsLoggedIn = middleware.JWTWithConfig(
	middleware.JWTConfig{
		SigningKey:  GetJwtSecretKey(),
		ContextKey:  "user",
		TokenLookup: "header:Authorization",
		AuthScheme:  "Bearer",
		Claims:      jwt.MapClaims{},
	})

Functions

func GenerateTokenPair

func GenerateTokenPair(user models.User) (*string, *string, interface{}, error)

func GetJwtSecretKey

func GetJwtSecretKey() []byte

on this function why load .env because handler function on echo reload before func init on main.go

Types

This section is empty.

Jump to

Keyboard shortcuts

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