middleware

package
v0.68.13-beta2024111501 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package middleware provides a set of middleware for the Terragrunt provider cache server.

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)

Validator validates tokens.

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