middleware

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIKeyAuth

func APIKeyAuth(userService user.Service) func(http.Handler) http.Handler

APIKeyAuth validates API keys and sets the verified user ID in context. Must be called before BearerAuth to enable the binding check.

func BearerAuth

func BearerAuth(tokenService token.Service) func(http.Handler) http.Handler

BearerAuth validates bearer tokens and sets the verified user ID in context. Validates tokens with WHOOP API instead of trusting client headers.

func RateLimitWithBackend

func RateLimitWithBackend(backend storage.RateLimiter) func(http.Handler) http.Handler

RateLimitWithBackend applies IP-based rate limiting.

Types

This section is empty.

Jump to

Keyboard shortcuts

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