set verify ssl parameter for HTTP based QR provider to true by default PR #126

This commit is contained in:
Nicolas CARPi
2024-04-27 18:58:46 +02:00
committed by GitHub
7 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ title: Image-Charts
Argument | Default value
------------------------|---------------
`$verifyssl` | `false`
`$verifyssl` | `true`
`$errorcorrectionlevel` | `'L'`
`$margin` | `4`
+1 -1
View File
@@ -7,7 +7,7 @@ title: QR Server
Argument | Default value
------------------------|---------------
`$verifyssl` | `false`
`$verifyssl` | `true`
`$errorcorrectionlevel` | `'L'`
`$margin` | `4`
`$qzone` | `1`
+1 -1
View File
@@ -6,7 +6,7 @@ namespace RobThree\Auth\Providers\Qr;
abstract class BaseHTTPQRCodeProvider implements IQRCodeProvider
{
protected bool $verifyssl;
protected bool $verifyssl = true;
protected function getContent(string $url): string|bool
{
@@ -7,7 +7,7 @@ namespace RobThree\Auth\Providers\Qr;
// https://developers.google.com/chart/infographics/docs/qr_codes
class GoogleChartsQrCodeProvider extends BaseHTTPQRCodeProvider
{
public function __construct(protected bool $verifyssl = false, public string $errorcorrectionlevel = 'L', public int $margin = 4, public string $encoding = 'UTF-8')
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public int $margin = 4, public string $encoding = 'UTF-8')
{
}
@@ -9,7 +9,7 @@ namespace RobThree\Auth\Providers\Qr;
*/
class ImageChartsQRCodeProvider extends BaseHTTPQRCodeProvider
{
public function __construct(protected bool $verifyssl = false, public string $errorcorrectionlevel = 'L', public int $margin = 1)
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public int $margin = 1)
{
}
+2 -2
View File
@@ -5,11 +5,11 @@ declare(strict_types=1);
namespace RobThree\Auth\Providers\Qr;
/**
* Use http://goqr.me/api/doc/create-qr-code/ to get QR code
* Use https://goqr.me/api/doc/create-qr-code/ to get QR code
*/
class QRServerProvider extends BaseHTTPQRCodeProvider
{
public function __construct(protected bool $verifyssl = false, public string $errorcorrectionlevel = 'L', public int $margin = 4, public int $qzone = 1, public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'png')
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public int $margin = 4, public int $qzone = 1, public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'png')
{
}
+1 -2
View File
@@ -9,9 +9,8 @@ namespace RobThree\Auth\Providers\Qr;
*/
class QRicketProvider extends BaseHTTPQRCodeProvider
{
public function __construct(public string $errorcorrectionlevel = 'L', public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'p')
public function __construct(protected bool $verifyssl = true, public string $errorcorrectionlevel = 'L', public string $bgcolor = 'ffffff', public string $color = '000000', public string $format = 'p')
{
$this->verifyssl = false;
}
public function getMimeType(): string