middleware

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyAuth

func KeyAuth(token string) echo.MiddlewareFunc

KeyAuth returns an KeyAuth middleware.

func Logger

func Logger() echo.MiddlewareFunc

func Recover

func Recover() echo.MiddlewareFunc

Types

type Authorization

type Authorization struct {
	Token string
}

func (*Authorization) Validator

func (auth *Authorization) Validator(bearerToken string, ctx echo.Context) (bool, error)

To enhance security, we use token-based authentication to connect to the cache server in order to prevent unauthorized connections from third-party applications. Currently, the cache server only supports `x-api-key` token, the value of which can be any text.

Jump to

Keyboard shortcuts

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