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
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
e554a9b5e4
change all $qrtext to camelCase version
2023-05-28 19:47:10 +02:00
d60113a77a
drop setAccessible calls as they its NOOP since PHP 8.1
2023-05-27 22:02:24 +02:00
3f3327e2a1
use type safe assertions
2023-05-27 22:01:34 +02:00
8bf962ecee
add readonly identifier
2023-05-27 22:00:48 +02:00
b80431341e
remove pointless +0
2023-05-27 22:00:11 +02:00
f542788673
fix formatting
2023-05-27 21:59:55 +02:00
e6e5d59297
lint
2022-12-29 14:07:44 +01:00
a968dd392a
remove the MightNotMakeAssertions shim
...
use expectNotToPerformAssertions() instead
2022-12-29 14:04:37 +01:00
921425d0ff
use psr12 in phpcs config
2022-12-29 13:35:16 +01:00
4711674ec0
crank phpstan to level 6
2022-12-29 13:32:02 +01:00
ac721e57b9
add php-cs-fixer
2022-12-07 23:10:13 +01:00
a8c297c178
second batch with QR providers
2022-12-07 23:02:41 +01:00
aeb4b00c60
first batch
2022-12-07 22:28:52 +01:00
66e1e030ba
♻️ re arrange useful testing code for provider tests
2021-12-19 19:32:45 +00:00
4f1543f782
🚨 add test to cover null issuer
2021-12-19 18:16:38 +00:00
b24204bbed
Remove using https://github.com as HttpTimeProvider test source
...
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com >
2021-03-15 08:43:09 -04:00
33a32cb099
📚 doc blocks
2021-03-08 18:24:44 +00:00
58d3354367
🐛 correct some minor issues
2021-03-08 18:20:07 +00:00
178f4447a7
🚨 breakdown tests into separate files
2021-02-03 09:31:07 +00:00
c3110d9760
Assert in non-asserting ('risky') tests
2020-11-02 16:36:58 +01:00
7477d5d656
* Replace google image charts with image-charts.com
2019-03-19 22:51:19 +01:00
c18ec155ae
* Minor refactoring of verifyCode.
2018-06-09 12:09:24 +02:00
fca87f2d09
* Fix a bug that caused timeslices to be returned instead of the intended timeslice
...
* Upped version
2018-06-06 02:32:07 +02:00
0ac68f6b86
* Fix PHP7.2 issue with HashRNGProvider
...
* Fix PHP7.1+ issue with MCryptRNGProvider
2018-06-06 01:47:03 +02:00
fac4ebd44b
* Remove time.google.com to see if that will make travis build again
2018-06-06 01:38:51 +02:00
ea9b87fe32
* Changed time.windows.com to time.google.com (doesn't affect anything except that it should stop travis from failing)
2018-06-06 00:53:02 +02:00
93fc6355d4
* Dropped ConvertUnixTimeDotComTimeProvider
...
* Added NTPTimeProvider
* Added out argument on verifyCode() method that returns the matched timeslice (if any) when a valid code was entered
2018-06-05 22:17:49 +02:00
c114772d01
* Fix PHP 5.3 array syntax in unittests
2017-02-17 14:59:44 +01:00
9735116635
* Implemented ITimeProviders
2017-02-17 14:53:55 +01:00
178c60d947
* Redo #15 which somehow didn't merge...
2017-02-17 12:15:17 +01:00
f546c73537
* Added CSRNGProvider to requires in unittestfile.
2015-12-02 16:40:18 +01:00
c94fcd83d8
* Added new (PHP7+) CSRNGProvider (uses random_bytes)
...
* Added a bunch basic of unittests for the RNG's
* QRicketProvider and QRServerProvider now throw on invalid MIME-types
* TwoFactorAuth now first tries to use CSRNGProvider before any of the other RNG providers
2015-12-02 16:38:20 +01:00
74a18a8fa6
* Added some base32 decoding-specific unittests
...
* Base32 decoding now allows for padding chars
2015-03-22 23:46:15 +01:00
fad49deb8c
* Unittest cleanup
2015-03-21 01:51:13 +01:00
34b6f279ca
* Tabs -> Spaces. Yep.
2015-03-21 01:35:08 +01:00
bfebb4b57d
* Added known testvectors from RFC 6238 to unittests
2015-03-20 16:46:24 +01:00
1db877ac79
* Added unittests + travis-ci yml
2015-03-20 13:07:52 +01:00