middlewares

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 12 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 added in v0.4.1

func NewBinder() echo.Binder

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

func Session added in v0.6.0

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