// SPDX-License-Identifier: Apache-2.0
// Copyright 2024-2026 Vorion LLC
/**
 * API Middleware Barrel Export
 *
 * Exports all middleware components for API hardening:
 * - Validation middleware (Zod-based input validation)
 * - Rate limiting middleware (per-tenant and per-endpoint)
 * - Security middleware (headers, request ID, logging)
 * - API key enforcement middleware (API key auth with JWT integration)
 * - DPoP enforcement middleware (sender-constrained tokens per RFC 9449)
 *
 * @packageDocumentation
 */
// Validation middleware
export { validateBody, validateQuery, validateParams, validateRequest, registerValidationPlugin, } from './validation.js';
// Rate limiting middleware
export { rateLimit, rateLimitPerTenant, rateLimitByMethod, registerRateLimitPlugin, getRateLimitStore, resetRateLimitStore, getRateLimitStats, resetTenantRateLimit, } from './rateLimit.js';
// Security middleware
export { securityHeaders, requestIdInjection, requestLogging, combinedSecurityMiddleware, registerSecurityPlugin, maskSensitiveData, timingSafeEqual, } from './security.js';
// API key enforcement middleware
export { apiKeyEnforcementPlugin, createRouteAuth, requireApiKeyAuth, requireJwtOrApiKey, 
// Re-exports from api-keys middleware
apiKeyMiddleware, requireScopes, getApiKey, hasApiKey, getApiKeyTenantId, } from './api-key-enforcement.js';
// DPoP enforcement middleware
export { dpopEnforcementPlugin, dpopRequired, dpopOptional, dpopNone, requireDPoP, optionalDPoP, hasDPoPProof, getDPoPKeyThumbprint, getDPoPContext, dpopValidationFailed, 
// Re-exports from DPoP service
DPoPService, DPoPError, createDPoPService, } from './dpop-enforcement.js';
// Redis-backed distributed rate limiting
export { RedisRateLimiter, createRateLimiter, redisRateLimitPlugin, redisRateLimitPerUser, redisRateLimitPerIp, redisRateLimitPerTenant, getRedisRateLimiter, resetRedisRateLimiter, } from './redis-rate-limiter.js';
// API metrics middleware
export { metricsMiddleware, createApiTimer, } from './metrics.js';
// Webhook signature verification middleware
export { createWebhookVerifyMiddleware, webhookVerifyPlugin, verifyRequestSignature, getWebhookSecurityDocumentation, WEBHOOK_VERIFICATION_SAMPLE_CODE, SIGNATURE_HEADER, SIGNATURE_TIMESTAMP_HEADER, } from './webhook-verify.js';
// Comprehensive rate limits
export { rateLimitsPlugin, comprehensiveRateLimit, createEndpointRateLimit, getRateLimitStatus, getUserRateLimitStore, resetUserRateLimitStore, rateLimitConfig, defaultMultipliers, RATE_LIMIT_BYPASS_PERMISSION, } from './rate-limits.js';
// Audit middleware
export { 
// Factory and plugin
createAuditMiddleware, auditMiddlewarePlugin, 
// Route decorators
withAudit, captureBeforeState, recordAuditEvent, recordAccessDeniedEvent, MUTATION_METHODS, } from './audit.js';
//# sourceMappingURL=index.js.map