middleware

package
v0.0.0-...-511e509 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKeyAllowedJobAliases = "auth.allowed_job_aliases"

ContextKeyAllowedJobAliases stores the scoped job aliases available to list endpoints.

View Source
const ContextKeyAuth = "auth"

ContextKeyAuth is the key used to store the authenticated API key in the Echo context.

Variables

This section is empty.

Functions

func Auth

func Auth(svc *auth.Service, auditor *auth.AuditLogger, limiter *auth.RateLimiter) echo.MiddlewareFunc

Auth returns Echo middleware that enforces API key authentication and RBAC.

func GetAllowedJobAliases

func GetAllowedJobAliases(c *echo.Context) []string

GetAllowedJobAliases returns the scoped aliases injected by the auth middleware.

func GetAuthKey

func GetAuthKey(c *echo.Context) *models.APIKey

GetAuthKey extracts the authenticated API key from the Echo context. Returns nil if no key is present (e.g. unauthenticated endpoints).

Types

This section is empty.

Jump to

Keyboard shortcuts

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