import { Middleware } from "../types/http.js"; import { AuthContext } from "../types/types.js"; /** * Creates an authentication middleware that validates JWT tokens from the `Authorization` header. * * @param secret - The secret key used to verify the JWT token. * @returns A middleware function that authenticates requests and populates the context with user information. * * @throws {AuthenticationError} If the authorization header is missing, malformed, or the token is invalid. * * @example * app.use(authMiddleware(process.env.JWT_SECRET)); */ export declare function authMiddleware(secret: string): Middleware; //# sourceMappingURL=auth.d.ts.map