middleware

package
v0.0.0-...-0702a85 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrJWTMissing = echo.NewHTTPError(http.StatusUnauthorized, "un authorized")
	ErrJWTInvalid = echo.NewHTTPError(http.StatusForbidden, "invalid or expired jwt")
)

Functions

func JWT

func JWT(key interface{}) echo.MiddlewareFunc

func JWTWithConfig

func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc

Types

type Error

type Error struct {
	Errors map[string]interface{} `json:"errors"`
}

func NewError

func NewError(err error) Error

type JWTConfig

type JWTConfig struct {
	Skipper    Skipper
	SigningKey interface{}
}

type Skipper

type Skipper func(c echo.Context) bool

Jump to

Keyboard shortcuts

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