395 Commits

Author SHA1 Message Date
85408c4e77 doc: getting started: improve examples (#154)
add example for default lib qr provider and add issuer too

see #152
v3.0.3
2026-01-05 13:17:41 +00:00
3516aae5a3 Removed curl_close that has no effect since PHP 8.0 to avoid deprecation warning on PHP 8.5 (#155)
Since 8.0 a CurlHandle object is returned, and curl_close() has no effect, so this change won't impact earlier versions.
2026-01-05 13:16:44 +00:00
a2fa4c11a9 🔧 exclude problematic versions from automated tests 2026-01-05 13:16:07 +00:00
57970d3d5f 🔧 update workflows 2026-01-05 13:16:07 +00:00
83918a7658 Restore company name in demo (#153) 2025-12-01 13:33:04 +00:00
9b2d795acc Merge pull request #149 from dereuromark/patch-1
Fix up readme
2025-04-11 00:41:11 +02:00
24f6d2fd10 Fix up readme 2025-04-11 00:25:59 +02:00
6d70f9ca8e add support for endroid/qr-code (with logo) version 6 (#143) v3.0.2 2024-10-24 16:14:25 +01:00
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
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
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
ec82d397ee 📚 consistent changelog links to github (#135) v3.0.0 2024-05-27 11:23:05 +01:00
fc3adc7245 mention #130 in changelog 2024-05-17 14:46:27 +02:00
337e96b7af Merge pull request #134 from RobThree/nico-coc
add a code of conduct
2024-05-12 14:21:55 +02:00
91c091c316 add a code of conduct
so we can point to it when needed
2024-05-12 14:06:05 +02:00
9e8b31ebbc mention #130 in changelog 2024-05-12 13:52:10 +02:00
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
6194bb08a7 throw a QRException instead
and change the function signature
2024-05-07 03:16:01 +02:00
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
f5eb9a7051 Changelog for 3.x . PR #127 2024-04-28 12:27:24 +02:00
5c97ce9be8 Update CHANGELOG.md
Co-authored-by: Will Power <1619102+willpower232@users.noreply.github.com>
2024-04-28 00:22:58 +02:00
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
eb02cb7095 fix typos 2024-04-27 19:26:09 +02:00
c15668dc6d Changelog for 3.x 2024-04-27 19:23:24 +02:00
f16ea16e1b set verify ssl parameter for HTTP based QR provider to true by default PR #126 2024-04-27 18:58:46 +02:00
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
cd27effc02 use https protocol for qricket 2024-04-26 18:46:14 +02:00
2ef7b8e2c6 simplify installation instructions based on Will's comment 2024-04-26 18:45:08 +02:00
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
8007233058 remove mention of default external provider 2024-04-25 21:31:38 +02:00
22d45f2ab4 fix documentation link 2024-04-25 21:28:48 +02:00
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
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
8477141a36 🔧 bump to remove deprecation warnings 2024-04-19 11:40:57 +01:00
028867dec2 🚨 bacon has multiple versions now 2024-04-19 11:29:56 +01:00
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
d4a5026d86 Revert back to the intended 160 bits 2024-04-17 20:43:49 +02:00
bb6802c093 Merge branch 'master' into patch-1 2024-04-17 20:36:16 +02:00
b909cb38f6 Merge pull request #119 from NicolasCARPi/nico-sensitive-attr
Add SensitiveParameter to sensitive arguments
2024-04-17 20:28:42 +02:00
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
ecef270ba7 add CI4-auth link in README. fix #107 (#123) 2024-04-16 17:16:48 +01: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
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
83c7449270 use a link in CHANGELOG.md for SensitiveParameter 2024-04-15 22:43:29 +02:00
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
bba4c207c2 use global import 2024-04-15 21:43:53 +02:00
061a2a39b4 don't include the sensitive param change in breaking changes section
in changelog
2024-04-15 21:42:23 +02:00
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
319a58a001 Update IRNGProviderTest.php 2024-03-04 16:16:31 +01:00
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