middlewares

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidTokenMessage = "Invalid API Token"

InvalidTokenMessage is the message set when an invalid / missing token is found.

View Source
const TokenPathParam = "token"

TokenPathParam is the name of the path parameter used by URLAuthPrefix

View Source
const URLAuthPrefix = "/urlAuth/:" + TokenPathParam

URLAuthPrefix is the echo formatted url/path param which can be used for supplying an API token.

Variables

This section is empty.

Functions

func MakeAuth

func MakeAuth(header string, tokens []string) echo.MiddlewareFunc

MakeAuth constructs the auth middleware function

func MakeCORS

func MakeCORS(tokenHeader string) echo.MiddlewareFunc

MakeCORS sets up CORS with a token header.

func MakeLogger

func MakeLogger(log log.Logger) echo.MiddlewareFunc

MakeLogger initializes the logger middleware function

Types

type AuthMiddleware

type AuthMiddleware struct {
	// contains filtered or unexported fields
}

AuthMiddleware provides some data to the handler.

type LoggerMiddleware

type LoggerMiddleware struct {
	// contains filtered or unexported fields
}

LoggerMiddleware provides some extra state to the logger middleware

Jump to

Keyboard shortcuts

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