import { OpenAPIHono } from "@hono/zod-openapi";
import { Context, Next } from "hono";
import { Bindings, Variables } from "../types";
/**
 * Management API audience for cross-tenant operations.
 * Used when managing tenants from the main tenant with org-scoped tokens.
 */
export declare const MANAGEMENT_API_AUDIENCE = "urn:authhero:management";
/**
 * This registeres the authentication middleware. As it needs to read the OpenAPI definition, it needs to have a reference to the app.
 *
 * `requireManagementAudience` enables the defense-in-depth check that the
 * token's `aud` includes the management API audience. It must be enabled
 * for the management API and left off for everything else (the `/userinfo`
 * endpoint, for example, takes any access token issued by this tenant).
 */
export interface AuthMiddlewareOptions {
    requireManagementAudience?: boolean;
}
export declare function createAuthMiddleware(app: OpenAPIHono<{
    Bindings: Bindings;
    Variables: Variables;
}>, options?: AuthMiddlewareOptions): (ctx: Context<{
    Bindings: Bindings;
    Variables: any;
}>, next: Next) => Promise<void>;
