import type { AdminSessionManager } from './admin-session.js'; import type { DwnServerConfig } from '../config.js'; /** * The result of admin authentication. * * When authentication succeeds, `authMethod` indicates how the caller * authenticated: * - `'token'` — static bearer token (from `DWN_ADMIN_TOKEN`) * - `'session'` — passkey-derived session token */ export type AdminAuthResult = { /** `null` when auth succeeded, or a `Response` to send back on failure. */ error: Response | null; /** How the caller authenticated. Only set when `error` is `null`. */ authMethod?: 'token' | 'session'; }; /** * Validates the admin bearer token from the `Authorization` header. * * Supports two authentication methods: * 1. **Static bearer token** — the original `DWN_ADMIN_TOKEN` * 2. **Session token** — issued after a successful WebAuthn passkey login * * @returns An {@link AdminAuthResult}. When `error` is `null`, auth passed. */ export declare function validateAdminAuth(req: Request, config: DwnServerConfig, sessionManager?: AdminSessionManager): AdminAuthResult; //# sourceMappingURL=admin-auth.d.ts.map