Back to

Package middleware

Latest Go to latest

The highest tagged major version is .

Published: Oct 15, 2020 | License: Apache-2.0 | Module:



var (
	// RequireLogin check JWT token.
	RequireLogin echo.MiddlewareFunc

	// RequireToken checks email confirmation token.
	RequireToken echo.MiddlewareFunc

func Init

func Init(e *echo.Echo)

Init middlewares

func RequireJSON

func RequireJSON(next echo.HandlerFunc) echo.HandlerFunc

RequireJSON requires an application/json content type.

type CustomClaims

type CustomClaims struct {
	Username string `json:"username"`
	Purpose  string `json:"purpose"`

CustomClaims are custom claims extending default ones. Used for email confirmation and pwd reset.

type LoginCustomClaims

type LoginCustomClaims struct {
	Name  string `json:"name"`
	Admin bool   `json:"admin"`

LoginCustomClaims are custom claims extending default ones

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier