Skip to content

Commit ee1a089

Browse files
committed
Use endroid/qr-code to generate QR code
Requires `endroid/qr-code` library in Icinga/icinga-php-thirdparty#53. Because we use **GPL-2.0** license for Icinga Web: - `chillerlan/php-qrcode: **Apache-2.0** (incompatible) - `endroid/qr-code`: **MIT** (compatible)
1 parent bbea643 commit ee1a089

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

library/Icinga/Authentication/TwoFactorTotp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Icinga\Authentication;
66

7-
use chillerlan\QRCode\QRCode;
87
use DateTime;
8+
use Endroid\QrCode\Builder\Builder;
99
use Icinga\Common\Database;
1010
use Icinga\Exception\ConfigurationError;
1111
use Icinga\Model\TwoFactorModel;
@@ -133,7 +133,7 @@ public function verify(string $otp): bool
133133
*/
134134
public function createQRCode(): string
135135
{
136-
return (new QRCode())->render($this->getTotpAuthUrl());
136+
return (new Builder(data: $this->getTotpAuthUrl()))->build()->getDataUri();
137137
}
138138

139139
/**

0 commit comments

Comments
 (0)