class AccountController {

    @Path("/enable2fa")
    @POST
    @Produces(MediaType.TEXT_HTML)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Operation(
        summary = "Enable two factor authentication",
        description = "Enable two factor authentication.",
        tags = {"accounts"},
        responses = {
            @ApiResponse(responseCode = "200", description = "Successful execution",
                content = @Content(mediaType = "text/html",
                    schema = @Schema(implementation = Account2FADetailsDTO.class)))
        })
    @PermitAll
    public Response enable2FA(
        @Parameter(description = "The passphrase") @FormParam("passphrase") String passphraseParam,
        @Parameter(description = "The secret phrase") @FormParam("secretPhrase") String secretPhraseParam,
        @Parameter(description = "The account ID.") @FormParam("account") String accountStr
    ) {

        ResponseBuilder response = ResponseBuilder.startTiming();
        TwoFactorAuthParameters params2FA = account2FAHelper.create2FAParameters(accountStr, passphraseParam, secretPhraseParam, null);

        TwoFactorAuthDetails twoFactorAuthDetails = account2FAHelper.enable2FA(params2FA);

        Account2FADetailsDTO dto = faDetailsConverter.convert(twoFactorAuthDetails);
        faDetailsConverter.addAccount(dto, params2FA.getAccountId());

        return response.bind(dto).build();
    }

    @Inject public  AccountController(Blockchain blockchain,
                             Account2FAHelper account2FAHelper,
                             AccountService accountService,
                             AccountPublicKeyService accountPublicKeyService,
                             AccountAssetService accountAssetService,
                             AccountCurrencyService accountCurrencyService,
                             AccountAssetConverter accountAssetConverter,
                             AccountCurrencyConverter accountCurrencyConverter,
                             AccountConverter converter,
                             BlockConverter blockConverter,
                             WalletKeysConverter walletKeysConverter,
                             Account2FADetailsConverter faDetailsConverter,
                             Account2FAConverter faConverter,
                             @AskOrderService OrderService<AskOrder, ColoredCoinsAskOrderPlacement> orderService,
                             FirstLastIndexParser indexParser,
                             AccountStatisticsService accountStatisticsService);

}