cliffordvickrey
92487acba4
add support for endroid/qr-code version 6 ( #140 )
...
* add support for endroid/qr-code version 6
* add endroid v6 to github workflows
* remove negative conditional (endroid-related)
---------
Co-authored-by: Clifford Vickrey <cvickrey@insuranceautomationgroup.com >
2024-10-24 13:01:17 +01:00
Nicolas CARPi
6194bb08a7
throw a QRException instead
...
and change the function signature
2024-05-07 03:16:01 +02:00
Nicolas CARPi
6f78141196
handle curl errors. fix #129
...
if curl fails for some reason to get a QR code from an external (http)
provider, the app will throw a TwoFactorAuthException.
also fix the demo page with new constructor signature
2024-05-07 03:08:31 +02:00
Nicolas CARPi
f16ea16e1b
set verify ssl parameter for HTTP based QR provider to true by default PR #126
2024-04-27 18:58:46 +02:00
Nicolas CARPi
cd27effc02
use https protocol for qricket
2024-04-26 18:46:14 +02:00
Nicolas CARPi
b964b2abbf
set verify ssl parameter for HTTP based QR provider to true by default
...
it's already bad to use an external provider, let's use the safest
defaults at least
2024-04-25 21:40:49 +02:00
Nicolas CARPi
2080319f6f
make QR Code Provider a mandatory constructor argument
...
This change is discussed in #104
Currently, the library defaults to a QR Code Provider using an external
service, thus leaking secrets.
This change forces the definition of a QR Code Provider in the
constructor. It is a breaking change.
fixes #104
2024-04-25 21:23:39 +02:00
Rob Janssen
d4a5026d86
Revert back to the intended 160 bits
2024-04-17 20:43:49 +02:00
Nicolas CARPi
e08b0a5445
Merge branch 'master' into nico-sensitive-attr
...
* master:
add CI4-auth link in README. fix #107 (#123 )
remove insecure rng providers and remove polyfill for hash_equals (#122 )
delete files specific to code editors (#120 )
Exclude useless files from dist archive #103
2024-04-16 18:21:01 +02:00
Nicolas CARPi
194ecc28eb
remove insecure rng providers and remove polyfill for hash_equals ( #122 )
...
* remove insecure rng providers
and remove the openssl provider. We now rely exclusively on
random_bytes(), as there are no reasons not to. Fix #121
* remove the isSecure property of the test rng class
* remove pointless test rng class
we were testing a test class, which didn't make a lot of sense.
* Revert "remove pointless test rng class"
This reverts commit f6da6bee6d .
* Reapply "remove pointless test rng class"
This reverts commit 06220d4a54 .
* assing rng provider to class attribute
this also aligns with other providers
* remove polyfill for hash_equals
2024-04-16 16:52:51 +01:00
Nicolas CARPi
bba4c207c2
use global import
2024-04-15 21:43:53 +02:00
Nicolas CARPi
76f420e6b2
add SensitiveParameter to sensitive arguments
...
This change adds the PHP attribute SensitiveParameter to the secret
holding variables.
See: https://www.php.net/manual/en/class.sensitiveparameter
This feature is only available in PHP 8.2, so the minimum php version
required has been updated.
Github Actions now use PHP 8.2 and 8.3 for the tests.
The checkout action has been updated to v4, too.
Fix issue #118
2024-04-15 21:40:19 +02:00
Matthijs van Schooten
13a56018f4
Fixed typo
2023-11-10 13:43:28 +01:00
Matthijs van Schooten
4b6b0601b7
Fixed check ordering
2023-11-10 13:41:25 +01:00
Matthijs van Schooten
63f6259db2
Added support for EndroidQR v5
2023-11-10 13:27:45 +01:00
Mark Magyar
e554a9b5e4
change all $qrtext to camelCase version
2023-05-28 19:47:10 +02:00
Mark Magyar
9bc454f425
use null coalescing assignment instead of just null coalescing
2023-05-28 18:58:39 +02:00
Mark Magyar
c2183e16b3
use property promotion for options
2023-05-28 18:46:07 +02:00
Mark Magyar
cf84371dad
use http_build_query instead of sprintf to improve readability
2023-05-28 01:58:44 +02:00
Mark Magyar
4d91d6ae27
use sprintf instead of concatenating
2023-05-28 01:13:12 +02:00
Mark Magyar
ab51d16de7
remove redundant assignment, use shorthard for nullable type
2023-05-27 21:43:04 +02:00
Mark Magyar
d4f6aa1ee6
add missing @throws tag
2023-05-27 21:41:10 +02:00
Mark Magyar
04ff3e7e3f
fix nullable return type hint
2023-05-27 21:37:44 +02:00
Mark Magyar
d94ee9c769
remove useless @throws because it never throws
2023-05-27 21:36:04 +02:00
Mark Magyar
955ce522f0
add readonly modifiers wherever possible
2023-05-27 21:33:54 +02:00
Mark Magyar
e584f0c56a
remove unnecessary type casts
2023-05-27 21:30:29 +02:00
Mark Magyar
5949a29b89
use null coalescing operator instead of if checks
2023-05-27 21:29:57 +02:00
Mark Magyar
8bf8800523
use empty string comparison instead of strlen call
2023-05-27 21:29:57 +02:00
Mark Magyar
26413e69f0
extract strlen check from loop
2023-05-27 21:29:57 +02:00
Mark Magyar
3adb3e54e5
add missing delimiter for proper escaping
2023-05-27 21:29:57 +02:00
Mark Magyar
c45f7a23c9
fix return types for v3, replace switch with match
2023-05-27 21:29:57 +02:00
Mark Magyar
bdfa67d1f6
use static keyword for anonymous function definition
2023-05-27 21:29:57 +02:00
Mark Magyar
7675282f45
put scalar types to the right
2023-05-27 21:29:57 +02:00
Mark Magyar
1ca305ec4a
use spread syntax instead of array_merge
2023-05-27 21:29:57 +02:00
Mark Magyar
aadc32e85e
make parameter explicitly nullable
2023-05-27 21:29:57 +02:00
Mark Magyar
9a1aeb8c1f
fix formatting
2023-05-27 20:19:48 +02:00
Mark Magyar
4c8a88224a
replace switch with match
2023-05-27 20:14:33 +02:00
Mark Magyar
9523b35d34
use strict comparison
2023-05-27 20:06:37 +02:00
Mark Magyar
cc9400d901
fix possible typo in parameter name
...
Interface's method signature:
```php
public function getQRCodeImage(string $qrtext, int $size): string;
```
2023-05-27 20:05:58 +02:00
Mark Magyar
dfb5c1a113
make $borderWidth readonly
2023-05-27 20:04:08 +02:00
Nicolas CARPi
30248a8fb5
address remarks made by MasterOdin
2023-02-22 18:08:19 +01:00
Nicolas CARPi
86338cf3cd
split constructor in multilines
2022-12-29 13:47:06 +01:00
Nicolas CARPi
656e966cdf
remove useless function comment
2022-12-29 13:43:52 +01:00
Nicolas CARPi
921425d0ff
use psr12 in phpcs config
2022-12-29 13:35:16 +01:00
Nicolas CARPi
4711674ec0
crank phpstan to level 6
2022-12-29 13:32:02 +01:00
Nicolas CARPi
f034bc782e
use interface
2022-12-09 19:45:53 +01:00
Nicolas CARPi
f8ba3b234b
fix endroid qr provider handleErrorCorrectionLevel signature
2022-12-09 19:42:16 +01:00
Nicolas CARPi
db6256b5e8
fix endroid handleColor
2022-12-09 19:37:49 +01:00
Nicolas CARPi
041d0e38e2
fix bacon construct signature
2022-12-09 19:36:47 +01:00
Nicolas CARPi
1e75674a45
fix action php version and handleColour function signature for bacon qr
2022-12-09 19:32:27 +01:00