middleware

package
v1.0.29 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKey

func APIKey(apiKey, headerKey string) func(next http.Handler) http.Handler

func ErrorRecovery

func ErrorRecovery(logger *slog.Logger) func(next http.Handler) http.Handler

func JWT added in v1.0.17

func JWT(ctx context.Context, config *JWTConfig) func(next http.Handler) http.Handler

func Timeout

func Timeout(duration time.Duration) func(next http.Handler) http.Handler

Types

type JWTConfig added in v1.0.17

type JWTConfig struct {
	Issuer   string
	Iss      string
	Aud      []string
	TokenKey any
	Logger   *slog.Logger
}

Jump to

Keyboard shortcuts

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