middlewares

package
v0.6.2-0...-436338d Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CurrentUserContextKey is the key to retrieve the current_user from echo.Context.
	CurrentUserContextKey = "current_user"
	// CurrentSessionContextKey is the key to retrieve the current_session from echo.Context.
	CurrentSessionContextKey = "current_session"
)

Variables

This section is empty.

Functions

func HTTPErrorHandler

func HTTPErrorHandler(err error, c echo.Context)

HTTPErrorHandler is a middleware that formats rendered errors.

func NewBinder

func NewBinder() echo.Binder

NewBinder returns a wrapp of the default binder implementation with extra checks.

func Session

func Session(m session.Manager) echo.MiddlewareFunc

Session returns a Session auth middleware. It also handle JWT tokens from previous API versions. It stores current_user into echo.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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