import { FastifyReply } from "fastify"; import { AuthenticatedRequest } from "../../../common/interfaces/authenticated.request.interface"; import { CacheService } from "../../../core/cache/services/cache.service"; import { PasskeyRegistrationOptionsDTO } from "../dtos/passkey-options.dto"; import { PasskeyRegistrationVerifyDTO, PasskeyRenameDTO } from "../dtos/passkey-verify.dto"; import { PasskeyService } from "../services/passkey.service"; import { TwoFactorService } from "../services/two-factor.service"; /** * Passkey Controller * * Handles passkey (WebAuthn) registration and management. * All endpoints require JWT authentication. */ export declare class PasskeyController { private readonly passkeyService; private readonly twoFactorService; private readonly cacheService; constructor(passkeyService: PasskeyService, twoFactorService: TwoFactorService, cacheService: CacheService); /** * POST /auth/passkey/register/options * * Generate WebAuthn registration options for creating a new passkey. * Returns options to be passed to navigator.credentials.create(). */ getRegistrationOptions(req: AuthenticatedRequest, reply: FastifyReply, body: PasskeyRegistrationOptionsDTO): Promise; /** * POST /auth/passkey/register/verify * * Verify and register a new passkey after the user completes * the WebAuthn ceremony on their device. */ verifyRegistration(req: AuthenticatedRequest, reply: FastifyReply, body: PasskeyRegistrationVerifyDTO): Promise; /** * GET /auth/passkeys * * List all passkeys for the authenticated user. * Returns passkey info without sensitive data (public keys). */ listPasskeys(req: AuthenticatedRequest, reply: FastifyReply): Promise; /** * DELETE /auth/passkeys/:id * * Delete a passkey. * If this is the last 2FA method, 2FA will be automatically disabled. */ deletePasskey(req: AuthenticatedRequest, reply: FastifyReply, passkeyId: string): Promise; /** * PATCH /auth/passkeys/:id * * Rename a passkey. */ renamePasskey(reply: FastifyReply, passkeyId: string, body: PasskeyRenameDTO): Promise; } //# sourceMappingURL=passkey.controller.d.ts.map