<?php

declare(strict_types=1);

namespace apexl\Io\modules\user\Request;

use apexl\Io\Request\IoRequest;

/**
 * Carries a user-supplied 2FA code (a 6-digit TOTP code, or a recovery code)
 * for the complete-setup / authenticate / verify-recovery-code actions.
 */
final class TwoFactorCodeRequest extends IoRequest
{
    public function code(): string
    {
        return trim((string) $this->bodyParam('code', ''));
    }
}
