387 Commits

Author SHA1 Message Date
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>
v3.0.1
2024-10-24 13:01:17 +01:00
Nicolas CARPi ab4c33007f remove warning about default external qr code provider in README.md
Merge pull request #137 from RobThree/nico-readme
2024-08-20 15:05:21 +02:00
Nicolas CARPi 0ab012bbaf remove warning about default external qr code provider in README.md
In version 3.0, the qrcode provider must be explicitely set, so the
warning is not needed anymore.
Also rewrite the part about the curl library for php.
2024-08-20 13:35:17 +02:00
Will Power ec82d397ee 📚 consistent changelog links to github (#135) v3.0.0 2024-05-27 11:23:05 +01:00
Nicolas CARPi fc3adc7245 mention #130 in changelog 2024-05-17 14:46:27 +02:00
Rob Janssen 337e96b7af Merge pull request #134 from RobThree/nico-coc
add a code of conduct
2024-05-12 14:21:55 +02:00
Nicolas CARPi 91c091c316 add a code of conduct
so we can point to it when needed
2024-05-12 14:06:05 +02:00
Nicolas CARPi 9e8b31ebbc mention #130 in changelog 2024-05-12 13:52:10 +02:00
Nicolas CARPi df43660714 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 14:14:34 +02: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 f5eb9a7051 Changelog for 3.x . PR #127 2024-04-28 12:27:24 +02:00
Nicolas CARPi 5c97ce9be8 Update CHANGELOG.md
Co-authored-by: Will Power <1619102+willpower232@users.noreply.github.com>
2024-04-28 00:22:58 +02:00
Nicolas CARPi ab677e43ee Update CHANGELOG.md
propose the use of named arguments

Co-authored-by: Will Power <1619102+willpower232@users.noreply.github.com>
2024-04-28 00:22:41 +02:00
Nicolas CARPi eb02cb7095 fix typos 2024-04-27 19:26:09 +02:00
Nicolas CARPi c15668dc6d Changelog for 3.x 2024-04-27 19:23:24 +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 f35f2ae51a make QR Code Provider a mandatory constructor argument PR #125
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

The public function getQRCodeProvider() has been removed. It is provided by the user in the constructor, so it doesn't make a lot of sense to keep a getter around if we're not using it internally.
2024-04-27 18:58:17 +02:00
Nicolas CARPi cd27effc02 use https protocol for qricket 2024-04-26 18:46:14 +02:00
Nicolas CARPi 2ef7b8e2c6 simplify installation instructions based on Will's comment 2024-04-26 18:45:08 +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 8007233058 remove mention of default external provider 2024-04-25 21:31:38 +02:00
Nicolas CARPi 22d45f2ab4 fix documentation link 2024-04-25 21:28:48 +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
Will Power cabcf5d493 Merge pull request #124 from RobThree/bacon-has-multiple-versions-now
Bacon has multiple versions now
2024-04-19 12:26:01 +01:00
William Hall 8477141a36 🔧 bump to remove deprecation warnings 2024-04-19 11:40:57 +01:00
William Hall 028867dec2 🚨 bacon has multiple versions now 2024-04-19 11:29:56 +01:00
Rob Janssen dfc1124f96 Merge pull request #117 from Mattie112/patch-1
Changed default secret length from 80bits to 160bits as recommended by RFC4226
2024-04-17 20:46:47 +02:00
Rob Janssen d4a5026d86 Revert back to the intended 160 bits 2024-04-17 20:43:49 +02:00
Rob Janssen bb6802c093 Merge branch 'master' into patch-1 2024-04-17 20:36:16 +02:00
Rob Janssen b909cb38f6 Merge pull request #119 from NicolasCARPi/nico-sensitive-attr
Add SensitiveParameter to sensitive arguments
2024-04-17 20:28:42 +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 ecef270ba7 add CI4-auth link in README. fix #107 (#123) 2024-04-16 17:16:48 +01: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 323053bd52 delete files specific to code editors (#120)
* delete files specific to code editors

* remove TwoFactorAuth.phpproj
* remove TwoFactorAuth.sln

They are not used anymore. See https://github.com/RobThree/TwoFactorAuth/pull/119#issuecomment-2057777036

* remove deleted files from excluded files in composer.json
2024-04-16 14:44:25 +01:00
Nicolas CARPi 83c7449270 use a link in CHANGELOG.md for SensitiveParameter 2024-04-15 22:43:29 +02:00
Your Name 086a3758ec Exclude useless files from dist archive #103
Co-authored-by: Cédric Anne <cedric.anne@gmail.com>
2024-04-15 21:23:58 +01:00
Nicolas CARPi bba4c207c2 use global import 2024-04-15 21:43:53 +02:00
Nicolas CARPi 061a2a39b4 don't include the sensitive param change in breaking changes section
in changelog
2024-04-15 21:42:23 +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 319a58a001 Update IRNGProviderTest.php 2024-03-04 16:16:31 +01:00
Matthijs d996779182 Changed default secret bits from 80 to 160 as recommended by RFC4226
https://www.ietf.org/rfc/rfc4226.txt

(and TOTP refers to RFC4226, see https://www.ietf.org/rfc/rfc6238.txt)
2023-11-17 13:53:13 +01:00
Will Power ab93dd41ce Merge pull request #115 from Mattie112/endroidqr-v5
Fix issue #114 (Support for EndroidQR v5)
v2.1.0
2023-11-14 12:50:27 +00:00
William Hall ec35073c06 🔧 test all endroid versions we can care about 2023-11-14 12:49:15 +00: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 126afe4c25 Removed dependency again from composer 2023-11-10 13:32:44 +01:00
Matthijs van Schooten 63f6259db2 Added support for EndroidQR v5 2023-11-10 13:27:45 +01:00
William Hall 137df4dd3c 🔧 remove deprecated rule https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7066 2023-07-29 15:46:20 +01:00
Will Power 9476751d6b Merge pull request #110 from modelrailroader/patch-1
Fix docs: Construct new TwoFactorAuth-class
2023-07-29 15:36:31 +01:00