import { FastifyReply } from "fastify"; import { AuthenticatedRequest } from "../../../common/interfaces/authenticated.request.interface"; import { CacheService } from "../../../core/cache/services/cache.service"; import { TotpSetupDTO } from "../dtos/totp-setup.dto"; import { TotpSetupVerifyDTO } from "../dtos/totp-verify.dto"; import { TotpService } from "../services/totp.service"; import { TwoFactorService } from "../services/two-factor.service"; /** * TOTP Controller * * Handles TOTP authenticator management (setup, verification, listing, deletion). * All endpoints require JWT authentication. */ export declare class TotpController { private readonly totpService; private readonly twoFactorService; private readonly cacheService; constructor(totpService: TotpService, twoFactorService: TwoFactorService, cacheService: CacheService); /** * POST /auth/totp/setup * * Start TOTP authenticator setup. * Returns a QR code and secret for the authenticator app. * The authenticator is created in unverified state until verify-setup is called. */ setup(req: AuthenticatedRequest, reply: FastifyReply, body: TotpSetupDTO): Promise; /** * POST /auth/totp/verify-setup * * Verify and activate a newly set up TOTP authenticator. * The user must provide a valid TOTP code from their authenticator app. */ verifySetup(req: AuthenticatedRequest, reply: FastifyReply, body: TotpSetupVerifyDTO): Promise; /** * GET /auth/totp/authenticators * * List all TOTP authenticators for the authenticated user. * Returns authenticator info without sensitive data (secrets). */ listAuthenticators(req: AuthenticatedRequest, reply: FastifyReply): Promise; /** * DELETE /auth/totp/authenticators/:id * * Delete a TOTP authenticator. * If this is the last 2FA method, 2FA will be automatically disabled. */ deleteAuthenticator(req: AuthenticatedRequest, reply: FastifyReply, authenticatorId: string): Promise; } //# sourceMappingURL=totp.controller.d.ts.map