/** * Service Authentication Middleware * * Express middleware functions for protecting endpoints with service-to-service * authentication including standalone mode checking and service key validation. */ import { ServiceAuthMiddleware, ServiceAuthOptions } from './types'; /** * Initialize service auth with dependencies * This allows us to inject the isStandaloneMode function from gateway config */ export declare function initializeServiceAuth(standaloneCheck: () => boolean): void; /** * Middleware that only allows access in standalone mode */ export declare function standaloneOnlyAuth(): ServiceAuthMiddleware; /** * Middleware that requires a valid service API key */ export declare function serviceKeyAuth(allowedServiceKeys?: string[], apiKeyValidator?: (apiKey: string) => Promise): ServiceAuthMiddleware; /** * Middleware that allows access in standalone mode OR with valid service key */ export declare function standaloneOrServiceKeyAuth(apiKeyValidator?: (apiKey: string) => Promise): ServiceAuthMiddleware; /** * Factory function to create custom service authentication middleware */ export declare function createServiceAuthMiddleware(options: ServiceAuthOptions, apiKeyValidator?: (apiKey: string) => Promise): ServiceAuthMiddleware; /** * Utility middleware to add service auth context to request */ export declare function addServiceAuthContext(): ServiceAuthMiddleware;