From 241dfec585e3faf68ae9476650432aeb8c5a21c7 Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:09:42 +0200 Subject: [PATCH 1/7] fix: fixed docs --- docs/qr-codes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/qr-codes.md b/docs/qr-codes.md index 5bd3490..bf7b6c8 100644 --- a/docs/qr-codes.md +++ b/docs/qr-codes.md @@ -48,6 +48,7 @@ If you do not want to use the default QR code provider, you can specify the one ```php use RobThree\Auth\TwoFactorAuth; +use RobThree\Auth\Algorithm; $qrCodeProvider = new YourChosenProvider(); @@ -55,7 +56,7 @@ $tfa = new TwoFactorAuth( null, 6, 30, - 'sha1', + Algorithm::Sha1, $qrCodeProvider ); ``` From dd0ecaeed1452a020c28434a5f1e68c5cb650907 Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Thu, 8 Jun 2023 16:56:08 +0200 Subject: [PATCH 2/7] Fix: Changes for > PHP 8 --- docs/qr-codes.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/qr-codes.md b/docs/qr-codes.md index bf7b6c8..83e9b5d 100644 --- a/docs/qr-codes.md +++ b/docs/qr-codes.md @@ -50,14 +50,12 @@ If you do not want to use the default QR code provider, you can specify the one use RobThree\Auth\TwoFactorAuth; use RobThree\Auth\Algorithm; -$qrCodeProvider = new YourChosenProvider(); - $tfa = new TwoFactorAuth( null, 6, 30, Algorithm::Sha1, - $qrCodeProvider + YourChosenProvider: $qrCodeProvider ); ``` From 83611592db62a115a4ed6c4d757475bb64fa08b3 Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Sun, 11 Jun 2023 12:20:59 +0200 Subject: [PATCH 3/7] fix: fixed documentation --- docs/optional-configuration.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/optional-configuration.md b/docs/optional-configuration.md index 346d6cd..4016e76 100644 --- a/docs/optional-configuration.md +++ b/docs/optional-configuration.md @@ -7,15 +7,15 @@ title: Optional Configuration The instance (`new TwoFactorAuth()`) can only be configured by the constructor with the following optional arguments -Argument | Default value | Use -------------------|---------------|----- -`$issuer` | `null` | Will be displayed in the users app as the default issuer name when using QR code to import the secret -`$digits` | `6` | The number of digits the resulting codes will be -`$period` | `30` | The number of seconds a code will be valid -`$algorithm` | `'sha1'` | The algorithm used (one of `sha1`, `sha256`, `sha512`, `md5`) -`$qrcodeprovider` | `null` | QR-code provider -`$rngprovider` | `null` | Random Number Generator provider -`$timeprovider` | `null` | Time provider +Argument | Default value | Use +------------------|-------------------|----- +`$issuer` | `null` | Will be displayed in the users app as the default issuer name when using QR code to import the secret +`$digits` | `6` | The number of digits the resulting codes will be +`$period` | `30` | The number of seconds a code will be valid +`$algorithm` | `Algorithm::Sha1` | The algorithm used (one of `Algorithm::Sha1`, `Algorithm::Sha256`, `Algorithm::Sha512`, `Algorithm::md5`) +`$qrcodeprovider` | `null` | QR-code provider +`$rngprovider` | `null` | Random Number Generator provider +`$timeprovider` | `null` | Time provider **Note:** the default values for `$digits`, `$period`, and `$algorithm` provide the widest variety of support amongst common authenticator apps such as Google Authenticator. If you choose to use different values for these arguments you will likely have to instruct your users to use a specific app which supports your chosen configuration. From 6416e79c3e2339075e02d886bb05a619f0b79d5e Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Sun, 11 Jun 2023 12:22:26 +0200 Subject: [PATCH 4/7] fix: fixed typing --- docs/optional-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/optional-configuration.md b/docs/optional-configuration.md index 4016e76..d3e2556 100644 --- a/docs/optional-configuration.md +++ b/docs/optional-configuration.md @@ -12,7 +12,7 @@ Argument | Default value | Use `$issuer` | `null` | Will be displayed in the users app as the default issuer name when using QR code to import the secret `$digits` | `6` | The number of digits the resulting codes will be `$period` | `30` | The number of seconds a code will be valid -`$algorithm` | `Algorithm::Sha1` | The algorithm used (one of `Algorithm::Sha1`, `Algorithm::Sha256`, `Algorithm::Sha512`, `Algorithm::md5`) +`$algorithm` | `Algorithm::Sha1` | The algorithm used (one of `Algorithm::Sha1`, `Algorithm::Sha256`, `Algorithm::Sha512`, `Algorithm::Md5`) `$qrcodeprovider` | `null` | QR-code provider `$rngprovider` | `null` | Random Number Generator provider `$timeprovider` | `null` | Time provider From a6f7735b9fbd1143625cdb4292e28720dab5760d Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Fri, 23 Jun 2023 17:54:58 +0200 Subject: [PATCH 5/7] fix: docs for new PHP Version --- docs/qr-codes.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/qr-codes.md b/docs/qr-codes.md index 83e9b5d..25fdd3c 100644 --- a/docs/qr-codes.md +++ b/docs/qr-codes.md @@ -48,14 +48,10 @@ If you do not want to use the default QR code provider, you can specify the one ```php use RobThree\Auth\TwoFactorAuth; -use RobThree\Auth\Algorithm; $tfa = new TwoFactorAuth( - null, - 6, - 30, - Algorithm::Sha1, - YourChosenProvider: $qrCodeProvider + issuer: "Your Company Or App Name", + qrcodeprovider: $qrCodeProvider ); ``` From d5aa22a96f7b0b0f33a935cbe0821930f0c72bfa Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Fri, 23 Jun 2023 17:56:25 +0200 Subject: [PATCH 6/7] fix: hyperlinks for new file extensions --- docs/qr-codes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/qr-codes.md b/docs/qr-codes.md index 25fdd3c..672262d 100644 --- a/docs/qr-codes.md +++ b/docs/qr-codes.md @@ -20,19 +20,19 @@ You can also specify a size as a third argument which is 200 by default. ## Online Providers -[QRServerProvider](qr-codes/qr-server.html) (default) +[QRServerProvider](qr-codes/qr-server.md) (default) **Warning:** Whilst it is the default, this provider is not suggested for applications where absolute security is needed, because it uses an external service for the QR code generation. You can make use of the included offline providers listed below which generate locally. -[ImageChartsQRCodeProvider](qr-codes/image-charts.html) +[ImageChartsQRCodeProvider](qr-codes/image-charts.md) -[QRicketProvider](qr-codes/qrickit.html) +[QRicketProvider](qr-codes/qrickit.md) ## Offline Providers -[EndroidQrCodeProvider](qr-codes/endroid.html) and EndroidQrCodeWithLogoProvider +[EndroidQrCodeProvider](qr-codes/endroid.md) and EndroidQrCodeWithLogoProvider -[BaconQRCodeProvider](qr-codes/bacon.html) +[BaconQRCodeProvider](qr-codes/bacon.md) **Note:** offline providers may have additional PHP requirements in order to function, you should study what is required before trying to make use of them. From 0565d63e6aacce62f03b94a26e0a328031423c46 Mon Sep 17 00:00:00 2001 From: Jan <96944229+modelrailroader@users.noreply.github.com> Date: Fri, 23 Jun 2023 21:21:37 +0200 Subject: [PATCH 7/7] fix: better understanding for QrCodeProvider class --- docs/qr-codes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/qr-codes.md b/docs/qr-codes.md index 672262d..7236198 100644 --- a/docs/qr-codes.md +++ b/docs/qr-codes.md @@ -49,6 +49,8 @@ If you do not want to use the default QR code provider, you can specify the one ```php use RobThree\Auth\TwoFactorAuth; +$qrCodeProvider = new YourChosenProvider(); + $tfa = new TwoFactorAuth( issuer: "Your Company Or App Name", qrcodeprovider: $qrCodeProvider