Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -0,0 +1,76 @@
<?php
declare(strict_types=1);
namespace App\Framework\Totp;
/**
* TOTP QR Code Data Value Object
*
* Contains all information needed for QR code generation for TOTP setup.
*/
final readonly class TotpQrData
{
public function __construct(
public string $uri,
public TotpSecret $secret,
public string $accountName,
public string $issuer,
public int $digits,
public int $period,
public string $algorithm,
public ?string $qrCodeSvg = null,
public ?string $qrCodeDataUri = null
) {
}
/**
* Get the otpauth URI
*/
public function getUri(): string
{
return $this->uri;
}
/**
* Get Base32 encoded secret for manual entry
*/
public function getManualEntryKey(): string
{
return $this->secret->toFormattedBase32();
}
/**
* Get setup instructions for manual entry
*/
public function getManualSetupInstructions(): array
{
return [
'account' => $this->accountName,
'issuer' => $this->issuer,
'secret' => $this->getManualEntryKey(),
'digits' => $this->digits,
'period' => $this->period,
'algorithm' => strtoupper($this->algorithm),
];
}
/**
* Convert to array for JSON responses
*/
public function toArray(): array
{
return [
'qr_uri' => $this->uri,
'qr_code_svg' => $this->qrCodeSvg,
'qr_code_data_uri' => $this->qrCodeDataUri,
'manual_entry_key' => $this->getManualEntryKey(),
'account_name' => $this->accountName,
'issuer' => $this->issuer,
'digits' => $this->digits,
'period' => $this->period,
'algorithm' => $this->algorithm,
'setup_instructions' => $this->getManualSetupInstructions(),
];
}
}