middleware

package
v0.67.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 4 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(logger log.Logger) echo.MiddlewareFunc

func Recover

func Recover(logger log.Logger) 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