Skip to content

Commit bb6802c

Browse files
authored
Merge branch 'master' into patch-1
2 parents 319a58a + b909cb3 commit bb6802c

20 files changed

+49
-396
lines changed

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/.github/ export-ignore
2+
/demo/ export-ignore
3+
/docs/ export-ignore
4+
/tests/ export-ignore
5+
/testsDependency/ export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/.php-cs-fixer.dist.php export-ignore
9+
/logo.png export-ignore
10+
/multifactorauthforeveryone.png export-ignore
11+
/phpstan.neon export-ignore
12+
/phpunit.xml export-ignore

.github/workflows/test-bacon.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
php-version: ['8.1', '8.2']
13+
php-version: ['8.2', '8.3']
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- uses: shivammathur/setup-php@v2
1919
with:

.github/workflows/test-endroid.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
php-version: ['8.1', '8.2']
13+
php-version: ['8.2', '8.3']
1414
endroid-version: ["^3","^4","^5"]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818

1919
- uses: shivammathur/setup-php@v2
2020
with:

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
php-version: ['8.1', '8.2']
13+
php-version: ['8.2', '8.3']
1414

1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717

1818
- uses: shivammathur/setup-php@v2
1919
with:

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# RobThree\TwoFactorAuth changelog
22

3+
# Version 3.x
4+
5+
## Breaking changes
6+
7+
### PHP Version
8+
9+
Version 3.x requires at least PHP 8.2.
10+
11+
## Other changes
12+
13+
* The new PHP attribute [SensitiveParameter](https://www.php.net/manual/en/class.sensitiveparameter.php) was added to the code, to prevent accidental leak of secrets in stack traces.
14+
315
# Version 2.x
416

517
## Breaking changes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ You can make use of the included [Endroid](https://robthree.github.io/TwoFactorA
1717

1818
## Requirements
1919

20-
* Requires PHP version >=8.1
20+
* Requires PHP version >=8.2
2121
* [cURL](http://php.net/manual/en/book.curl.php) when using the provided `QRServerProvider` (default), `ImageChartsQRCodeProvider` or `QRicketProvider` but you can also provide your own QR-code provider.
22-
* [random_bytes()](http://php.net/manual/en/function.random-bytes.php), [OpenSSL](http://php.net/manual/en/book.openssl.php) or [Hash](http://php.net/manual/en/book.hash.php) depending on which built-in RNG you use (TwoFactorAuth will try to 'autodetect' and use the best available); however: feel free to provide your own (CS)RNG.
2322

2423
Optionally, you may need:
2524

@@ -42,6 +41,7 @@ If you need more in-depth information about the configuration available then you
4241
## Integrations
4342

4443
- [CakePHP 3](https://github.com/andrej-griniuk/cakephp-two-factor-auth)
44+
- [CI4-Auth: a user, group, role and permission management library for Codeigniter 4](https://github.com/glewe/ci4-auth)
4545

4646
## License
4747

TwoFactorAuth.phpproj

Lines changed: 0 additions & 69 deletions
This file was deleted.

TwoFactorAuth.sln

Lines changed: 0 additions & 22 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"source": "https://github.com/RobThree/TwoFactorAuth"
2828
},
2929
"require": {
30-
"php": ">=8.1.0"
30+
"php": ">=8.2.0"
3131
},
3232
"require-dev": {
3333
"phpunit/phpunit": "^9",
@@ -61,20 +61,5 @@
6161
"test": [
6262
"XDEBUG_MODE=coverage phpunit"
6363
]
64-
},
65-
"archive": {
66-
"exclude": [
67-
"/.github/",
68-
"/demo/",
69-
"/docs/",
70-
"/tests/",
71-
"/testsDependency/",
72-
"/.gitignore",
73-
"/logo.png",
74-
"/multifactorauthforeveryone.png",
75-
"/phpunit.xml",
76-
"/TwoFactorAuth.phpproj",
77-
"/TwoFactorAuth.sln"
78-
]
7964
}
8065
}

docs/optional-configuration.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,7 @@ Argument | Default value | Use
2121

2222
### RNG providers
2323

24-
This library also comes with some [Random Number Generator (RNG)](https://en.wikipedia.org/wiki/Random_number_generation) providers. The RNG provider generates a number of random bytes and returns these bytes as a string. These values are then used to create the secret. By default (no RNG provider specified) TwoFactorAuth will try to determine the best available RNG provider to use in this order.
25-
26-
1. [CSRNGProvider](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/CSRNGProvider.php) for PHP7+
27-
2. [OpenSSLRNGProvider](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/OpenSSLRNGProvider.php) where openssl is available
28-
3. [HashRNGProvider](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/HashRNGProvider.php) **non-cryptographically secure** fallback
29-
30-
Each of these RNG providers have some constructor arguments that allow you to tweak some of the settings to use when creating the random bytes.
31-
32-
You can also implement your own by implementing the [`IRNGProvider` interface](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/IRNGProvider.php).
24+
Should you feel the need to use a CSPRNG different than `random_bytes()`, you can use the `rngprovider` argument of the constructor to provide an object implementing the [`IRNGProvider`](https://github.com/RobThree/TwoFactorAuth/blob/master/lib/Providers/Rng/IRNGProvider.php) interface.
3325

3426
### Time providers
3527

0 commit comments

Comments
 (0)