import type { IRequest } from '../http/Request';
import type { IResponse } from '../http/Response';
export type NextFunction = (error?: Error) => void | Promise<void>;
/**
 * Service-to-service authentication strategies
 */
export type AuthStrategy = 'api-key' | 'jwt' | 'none' | 'custom';
export interface AuthContext {
    isServiceCall: boolean;
    serviceName?: string;
    strategy: AuthStrategy;
    authenticated: boolean;
}
export interface IApiKeyAuth {
    verify(token: string): boolean;
    generate(): string;
}
/**
 * API Key Authentication
 */
export declare const ApiKeyAuth: Readonly<{
    /**
     * Create a new API key auth instance
     */
    create(apiKey?: string): IApiKeyAuth;
}>;
export interface IJwtAuth {
    sign(payload: Record<string, unknown>, expiresIn?: string): string;
    verify(token: string): Record<string, unknown> | null;
}
/**
 * JWT Authentication
 */
export declare const JwtAuth: Readonly<{
    /**
     * Create a new JWT auth instance
     */
    create(secret?: string): IJwtAuth;
}>;
export interface ICustomAuth {
    verify(token: string): boolean;
}
/**
 * Custom Authentication (developer-defined)
 */
export declare const CustomAuth: Readonly<{
    /**
     * Create a new custom auth instance
     */
    create(validator: (token: string) => boolean): ICustomAuth;
}>;
export interface IServiceAuthMiddleware {
    registerCustomAuth(validator: (token: string) => boolean): void;
    middleware(strategy: AuthStrategy): (req: IRequest, res: IResponse, next: NextFunction) => void | Promise<void>;
}
export declare const ServiceAuthMiddleware: Readonly<IServiceAuthMiddleware>;
export default ServiceAuthMiddleware;
//# sourceMappingURL=ServiceAuthMiddleware.d.ts.map