diff --git a/bin/internal/create-release.sh b/bin/internal/create-release.sh
index f7b5e49a45..16e8474f6b 100755
--- a/bin/internal/create-release.sh
+++ b/bin/internal/create-release.sh
@@ -295,7 +295,7 @@ security_checkup() {
echo 'TCPDF should be installed, detection failed !'
exit 1;
fi
- if [ ! -f vendor/web-auth/webauthn-lib/src/Server.php ]; then
+ if [ ! -f vendor/web-auth/webauthn-lib/src/PublicKeyCredential.php ]; then
echo 'Webauthn-lib should be installed, detection failed !'
exit 1;
fi
diff --git a/composer.json b/composer.json
index bdd24f5505..abaefc6d6f 100644
--- a/composer.json
+++ b/composer.json
@@ -119,7 +119,7 @@
"symfony/console": "^6.2",
"tecnickcom/tcpdf": "^6.4.4",
"vimeo/psalm": "^5.14",
- "web-auth/webauthn-lib": "^3.3.12"
+ "web-auth/webauthn-lib": "^4.9"
},
"extra": {
"branch-alias": {
diff --git a/composer.lock b/composer.lock
index fe64c08f52..c810bc53a0 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "7a5beedce02b5791dce2d21c1c06c703",
+ "content-hash": "dc75f664c058abb83e64227678c73314",
"packages": [
{
"name": "composer/ca-bundle",
@@ -865,30 +865,30 @@
},
{
"name": "psr/log",
- "version": "1.1.4",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11"
+ "reference": "79dff0b268932c640297f5208d6298f71855c03e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
- "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e",
+ "reference": "79dff0b268932c640297f5208d6298f71855c03e",
"shasum": ""
},
"require": {
- "php": ">=5.3.0"
+ "php": ">=8.0.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "3.x-dev"
}
},
"autoload": {
"psr-4": {
- "Psr\\Log\\": "Psr/Log/"
+ "Psr\\Log\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -909,9 +909,9 @@
"psr-3"
],
"support": {
- "source": "https://github.com/php-fig/log/tree/1.1.4"
+ "source": "https://github.com/php-fig/log/tree/3.0.1"
},
- "time": "2021-05-03T11:20:27+00:00"
+ "time": "2024-08-21T13:31:24+00:00"
},
{
"name": "ralouphie/getallheaders",
@@ -2464,95 +2464,27 @@
},
"time": "2022-12-07T17:46:57+00:00"
},
- {
- "name": "beberlei/assert",
- "version": "v3.3.2",
- "source": {
- "type": "git",
- "url": "https://github.com/beberlei/assert.git",
- "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/beberlei/assert/zipball/cb70015c04be1baee6f5f5c953703347c0ac1655",
- "reference": "cb70015c04be1baee6f5f5c953703347c0ac1655",
- "shasum": ""
- },
- "require": {
- "ext-ctype": "*",
- "ext-json": "*",
- "ext-mbstring": "*",
- "ext-simplexml": "*",
- "php": "^7.0 || ^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "*",
- "phpstan/phpstan": "*",
- "phpunit/phpunit": ">=6.0.0",
- "yoast/phpunit-polyfills": "^0.1.0"
- },
- "suggest": {
- "ext-intl": "Needed to allow Assertion::count(), Assertion::isCountable(), Assertion::minCount(), and Assertion::maxCount() to operate on ResourceBundles"
- },
- "type": "library",
- "autoload": {
- "files": [
- "lib/Assert/functions.php"
- ],
- "psr-4": {
- "Assert\\": "lib/Assert"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-2-Clause"
- ],
- "authors": [
- {
- "name": "Benjamin Eberlei",
- "email": "kontakt@beberlei.de",
- "role": "Lead Developer"
- },
- {
- "name": "Richard Quadling",
- "email": "rquadling@gmail.com",
- "role": "Collaborator"
- }
- ],
- "description": "Thin assertion library for input validation in business models.",
- "keywords": [
- "assert",
- "assertion",
- "validation"
- ],
- "support": {
- "issues": "https://github.com/beberlei/assert/issues",
- "source": "https://github.com/beberlei/assert/tree/v3.3.2"
- },
- "time": "2021-12-16T21:41:27+00:00"
- },
{
"name": "brick/math",
- "version": "0.9.3",
+ "version": "0.12.1",
"source": {
"type": "git",
"url": "https://github.com/brick/math.git",
- "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae"
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/brick/math/zipball/ca57d18f028f84f777b2168cd1911b0dee2343ae",
- "reference": "ca57d18f028f84f777b2168cd1911b0dee2343ae",
+ "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1",
+ "reference": "f510c0a40911935b77b86859eb5223d58d660df1",
"shasum": ""
},
"require": {
- "ext-json": "*",
- "php": "^7.1 || ^8.0"
+ "php": "^8.1"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
- "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.0",
- "vimeo/psalm": "4.9.2"
+ "phpunit/phpunit": "^10.1",
+ "vimeo/psalm": "5.16.0"
},
"type": "library",
"autoload": {
@@ -2572,24 +2504,25 @@
"arithmetic",
"bigdecimal",
"bignum",
+ "bignumber",
"brick",
- "math"
+ "decimal",
+ "integer",
+ "math",
+ "mathematics",
+ "rational"
],
"support": {
"issues": "https://github.com/brick/math/issues",
- "source": "https://github.com/brick/math/tree/0.9.3"
+ "source": "https://github.com/brick/math/tree/0.12.1"
},
"funding": [
{
"url": "https://github.com/BenMorel",
"type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/brick/math",
- "type": "tidelift"
}
],
- "time": "2021-08-15T20:50:18+00:00"
+ "time": "2023-11-29T23:19:16+00:00"
},
{
"name": "code-lts/u2f-php-server",
@@ -3311,82 +3244,6 @@
},
"time": "2022-03-02T22:36:06+00:00"
},
- {
- "name": "fgrosse/phpasn1",
- "version": "v2.5.0",
- "source": {
- "type": "git",
- "url": "https://github.com/fgrosse/PHPASN1.git",
- "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/42060ed45344789fb9f21f9f1864fc47b9e3507b",
- "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b",
- "shasum": ""
- },
- "require": {
- "php": "^7.1 || ^8.0"
- },
- "require-dev": {
- "php-coveralls/php-coveralls": "~2.0",
- "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
- },
- "suggest": {
- "ext-bcmath": "BCmath is the fallback extension for big integer calculations",
- "ext-curl": "For loading OID information from the web if they have not bee defined statically",
- "ext-gmp": "GMP is the preferred extension for big integer calculations",
- "phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "FG\\": "lib/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Friedrich Große",
- "email": "friedrich.grosse@gmail.com",
- "homepage": "https://github.com/FGrosse",
- "role": "Author"
- },
- {
- "name": "All contributors",
- "homepage": "https://github.com/FGrosse/PHPASN1/contributors"
- }
- ],
- "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.",
- "homepage": "https://github.com/FGrosse/PHPASN1",
- "keywords": [
- "DER",
- "asn.1",
- "asn1",
- "ber",
- "binary",
- "decoding",
- "encoding",
- "x.509",
- "x.690",
- "x509",
- "x690"
- ],
- "support": {
- "issues": "https://github.com/fgrosse/PHPASN1/issues",
- "source": "https://github.com/fgrosse/PHPASN1/tree/v2.5.0"
- },
- "abandoned": true,
- "time": "2022-12-19T11:08:26+00:00"
- },
{
"name": "fidry/cpu-core-counter",
"version": "1.1.0",
@@ -3713,55 +3570,40 @@
"time": "2024-02-16T16:06:16+00:00"
},
{
- "name": "league/uri",
- "version": "6.8.0",
+ "name": "lcobucci/clock",
+ "version": "3.2.0",
"source": {
"type": "git",
- "url": "https://github.com/thephpleague/uri.git",
- "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39"
+ "url": "https://github.com/lcobucci/clock.git",
+ "reference": "6f28b826ea01306b07980cb8320ab30b966cd715"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39",
- "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39",
+ "url": "https://api.github.com/repos/lcobucci/clock/zipball/6f28b826ea01306b07980cb8320ab30b966cd715",
+ "reference": "6f28b826ea01306b07980cb8320ab30b966cd715",
"shasum": ""
},
"require": {
- "ext-json": "*",
- "league/uri-interfaces": "^2.3",
- "php": "^8.1",
- "psr/http-message": "^1.0.1"
+ "php": "~8.2.0 || ~8.3.0",
+ "psr/clock": "^1.0"
},
- "conflict": {
- "league/uri-schemes": "^1.0"
+ "provide": {
+ "psr/clock-implementation": "1.0"
},
"require-dev": {
- "friendsofphp/php-cs-fixer": "^v3.9.5",
- "nyholm/psr7": "^1.5.1",
- "php-http/psr7-integration-tests": "^1.1.1",
- "phpbench/phpbench": "^1.2.6",
- "phpstan/phpstan": "^1.8.5",
- "phpstan/phpstan-deprecation-rules": "^1.0",
- "phpstan/phpstan-phpunit": "^1.1.1",
- "phpstan/phpstan-strict-rules": "^1.4.3",
- "phpunit/phpunit": "^9.5.24",
- "psr/http-factory": "^1.0.1"
- },
- "suggest": {
- "ext-fileinfo": "Needed to create Data URI from a filepath",
- "ext-intl": "Needed to improve host validation",
- "league/uri-components": "Needed to easily manipulate URI objects",
- "psr/http-factory": "Needed to use the URI factory"
+ "infection/infection": "^0.27",
+ "lcobucci/coding-standard": "^11.0.0",
+ "phpstan/extension-installer": "^1.3.1",
+ "phpstan/phpstan": "^1.10.25",
+ "phpstan/phpstan-deprecation-rules": "^1.1.3",
+ "phpstan/phpstan-phpunit": "^1.3.13",
+ "phpstan/phpstan-strict-rules": "^1.5.1",
+ "phpunit/phpunit": "^10.2.3"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "6.x-dev"
- }
- },
"autoload": {
"psr-4": {
- "League\\Uri\\": "src"
+ "Lcobucci\\Clock\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -3770,118 +3612,26 @@
],
"authors": [
{
- "name": "Ignace Nyamagana Butera",
- "email": "nyamsprod@gmail.com",
- "homepage": "https://nyamsprod.com"
+ "name": "Luís Cobucci",
+ "email": "lcobucci@gmail.com"
}
],
- "description": "URI manipulation library",
- "homepage": "https://uri.thephpleague.com",
- "keywords": [
- "data-uri",
- "file-uri",
- "ftp",
- "hostname",
- "http",
- "https",
- "middleware",
- "parse_str",
- "parse_url",
- "psr-7",
- "query-string",
- "querystring",
- "rfc3986",
- "rfc3987",
- "rfc6570",
- "uri",
- "uri-template",
- "url",
- "ws"
- ],
+ "description": "Yet another clock abstraction",
"support": {
- "docs": "https://uri.thephpleague.com",
- "forum": "https://thephpleague.slack.com",
- "issues": "https://github.com/thephpleague/uri/issues",
- "source": "https://github.com/thephpleague/uri/tree/6.8.0"
+ "issues": "https://github.com/lcobucci/clock/issues",
+ "source": "https://github.com/lcobucci/clock/tree/3.2.0"
},
"funding": [
{
- "url": "https://github.com/sponsors/nyamsprod",
+ "url": "https://github.com/lcobucci",
"type": "github"
- }
- ],
- "time": "2022-09-13T19:58:47+00:00"
- },
- {
- "name": "league/uri-interfaces",
- "version": "2.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/thephpleague/uri-interfaces.git",
- "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383",
- "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383",
- "shasum": ""
- },
- "require": {
- "ext-json": "*",
- "php": "^7.2 || ^8.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^2.19",
- "phpstan/phpstan": "^0.12.90",
- "phpstan/phpstan-phpunit": "^0.12.19",
- "phpstan/phpstan-strict-rules": "^0.12.9",
- "phpunit/phpunit": "^8.5.15 || ^9.5"
- },
- "suggest": {
- "ext-intl": "to use the IDNA feature",
- "symfony/intl": "to use the IDNA feature via Symfony Polyfill"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "League\\Uri\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
+ },
{
- "name": "Ignace Nyamagana Butera",
- "email": "nyamsprod@gmail.com",
- "homepage": "https://nyamsprod.com"
+ "url": "https://www.patreon.com/lcobucci",
+ "type": "patreon"
}
],
- "description": "Common interface for URI representation",
- "homepage": "http://github.com/thephpleague/uri-interfaces",
- "keywords": [
- "rfc3986",
- "rfc3987",
- "uri",
- "url"
- ],
- "support": {
- "issues": "https://github.com/thephpleague/uri-interfaces/issues",
- "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0"
- },
- "funding": [
- {
- "url": "https://github.com/sponsors/nyamsprod",
- "type": "github"
- }
- ],
- "time": "2021-06-28T04:27:21+00:00"
+ "time": "2023-11-17T17:00:27+00:00"
},
{
"name": "myclabs/deep-copy",
@@ -5499,6 +5249,104 @@
},
"time": "2022-12-03T07:47:07+00:00"
},
+ {
+ "name": "psr/clock",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/clock.git",
+ "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d",
+ "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0 || ^8.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Clock\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for reading the clock.",
+ "homepage": "https://github.com/php-fig/clock",
+ "keywords": [
+ "clock",
+ "now",
+ "psr",
+ "psr-20",
+ "time"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/clock/issues",
+ "source": "https://github.com/php-fig/clock/tree/1.0.0"
+ },
+ "time": "2022-11-25T14:36:26+00:00"
+ },
+ {
+ "name": "psr/event-dispatcher",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/event-dispatcher.git",
+ "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
+ "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\EventDispatcher\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Standard interfaces for event handling.",
+ "keywords": [
+ "events",
+ "psr",
+ "psr-14"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/event-dispatcher/issues",
+ "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
+ },
+ "time": "2019-01-08T18:20:26+00:00"
+ },
{
"name": "psr/http-client",
"version": "1.0.3",
@@ -5551,187 +5399,6 @@
},
"time": "2023-09-23T14:17:50+00:00"
},
- {
- "name": "ramsey/collection",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ramsey/collection.git",
- "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
- "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5",
- "shasum": ""
- },
- "require": {
- "php": "^8.1"
- },
- "require-dev": {
- "captainhook/plugin-composer": "^5.3",
- "ergebnis/composer-normalize": "^2.28.3",
- "fakerphp/faker": "^1.21",
- "hamcrest/hamcrest-php": "^2.0",
- "jangregor/phpstan-prophecy": "^1.0",
- "mockery/mockery": "^1.5",
- "php-parallel-lint/php-console-highlighter": "^1.0",
- "php-parallel-lint/php-parallel-lint": "^1.3",
- "phpcsstandards/phpcsutils": "^1.0.0-rc1",
- "phpspec/prophecy-phpunit": "^2.0",
- "phpstan/extension-installer": "^1.2",
- "phpstan/phpstan": "^1.9",
- "phpstan/phpstan-mockery": "^1.1",
- "phpstan/phpstan-phpunit": "^1.3",
- "phpunit/phpunit": "^9.5",
- "psalm/plugin-mockery": "^1.1",
- "psalm/plugin-phpunit": "^0.18.4",
- "ramsey/coding-standard": "^2.0.3",
- "ramsey/conventional-commits": "^1.3",
- "vimeo/psalm": "^5.4"
- },
- "type": "library",
- "extra": {
- "captainhook": {
- "force-install": true
- },
- "ramsey/conventional-commits": {
- "configFile": "conventional-commits.json"
- }
- },
- "autoload": {
- "psr-4": {
- "Ramsey\\Collection\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Ben Ramsey",
- "email": "ben@benramsey.com",
- "homepage": "https://benramsey.com"
- }
- ],
- "description": "A PHP library for representing and manipulating collections.",
- "keywords": [
- "array",
- "collection",
- "hash",
- "map",
- "queue",
- "set"
- ],
- "support": {
- "issues": "https://github.com/ramsey/collection/issues",
- "source": "https://github.com/ramsey/collection/tree/2.0.0"
- },
- "funding": [
- {
- "url": "https://github.com/ramsey",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/ramsey/collection",
- "type": "tidelift"
- }
- ],
- "time": "2022-12-31T21:50:55+00:00"
- },
- {
- "name": "ramsey/uuid",
- "version": "4.7.6",
- "source": {
- "type": "git",
- "url": "https://github.com/ramsey/uuid.git",
- "reference": "91039bc1faa45ba123c4328958e620d382ec7088"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ramsey/uuid/zipball/91039bc1faa45ba123c4328958e620d382ec7088",
- "reference": "91039bc1faa45ba123c4328958e620d382ec7088",
- "shasum": ""
- },
- "require": {
- "brick/math": "^0.8.8 || ^0.9 || ^0.10 || ^0.11 || ^0.12",
- "ext-json": "*",
- "php": "^8.0",
- "ramsey/collection": "^1.2 || ^2.0"
- },
- "replace": {
- "rhumsaa/uuid": "self.version"
- },
- "require-dev": {
- "captainhook/captainhook": "^5.10",
- "captainhook/plugin-composer": "^5.3",
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
- "doctrine/annotations": "^1.8",
- "ergebnis/composer-normalize": "^2.15",
- "mockery/mockery": "^1.3",
- "paragonie/random-lib": "^2",
- "php-mock/php-mock": "^2.2",
- "php-mock/php-mock-mockery": "^1.3",
- "php-parallel-lint/php-parallel-lint": "^1.1",
- "phpbench/phpbench": "^1.0",
- "phpstan/extension-installer": "^1.1",
- "phpstan/phpstan": "^1.8",
- "phpstan/phpstan-mockery": "^1.1",
- "phpstan/phpstan-phpunit": "^1.1",
- "phpunit/phpunit": "^8.5 || ^9",
- "ramsey/composer-repl": "^1.4",
- "slevomat/coding-standard": "^8.4",
- "squizlabs/php_codesniffer": "^3.5",
- "vimeo/psalm": "^4.9"
- },
- "suggest": {
- "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.",
- "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.",
- "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.",
- "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter",
- "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type."
- },
- "type": "library",
- "extra": {
- "captainhook": {
- "force-install": true
- }
- },
- "autoload": {
- "files": [
- "src/functions.php"
- ],
- "psr-4": {
- "Ramsey\\Uuid\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "A PHP library for generating and working with universally unique identifiers (UUIDs).",
- "keywords": [
- "guid",
- "identifier",
- "uuid"
- ],
- "support": {
- "issues": "https://github.com/ramsey/uuid/issues",
- "source": "https://github.com/ramsey/uuid/tree/4.7.6"
- },
- "funding": [
- {
- "url": "https://github.com/ramsey",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/ramsey/uuid",
- "type": "tidelift"
- }
- ],
- "time": "2024-04-27T21:32:50+00:00"
- },
{
"name": "roave/security-advisories",
"version": "dev-latest",
@@ -7598,104 +7265,42 @@
],
"time": "2024-05-01T10:20:27+00:00"
},
- {
- "name": "spomky-labs/base64url",
- "version": "v2.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/Spomky-Labs/base64url.git",
- "reference": "7752ce931ec285da4ed1f4c5aa27e45e097be61d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/Spomky-Labs/base64url/zipball/7752ce931ec285da4ed1f4c5aa27e45e097be61d",
- "reference": "7752ce931ec285da4ed1f4c5aa27e45e097be61d",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpstan/extension-installer": "^1.0",
- "phpstan/phpstan": "^0.11|^0.12",
- "phpstan/phpstan-beberlei-assert": "^0.11|^0.12",
- "phpstan/phpstan-deprecation-rules": "^0.11|^0.12",
- "phpstan/phpstan-phpunit": "^0.11|^0.12",
- "phpstan/phpstan-strict-rules": "^0.11|^0.12"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Base64Url\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Florent Morselli",
- "homepage": "https://github.com/Spomky-Labs/base64url/contributors"
- }
- ],
- "description": "Base 64 URL Safe Encoding/Decoding PHP Library",
- "homepage": "https://github.com/Spomky-Labs/base64url",
- "keywords": [
- "base64",
- "rfc4648",
- "safe",
- "url"
- ],
- "support": {
- "issues": "https://github.com/Spomky-Labs/base64url/issues",
- "source": "https://github.com/Spomky-Labs/base64url/tree/v2.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/Spomky",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/FlorentMorselli",
- "type": "patreon"
- }
- ],
- "time": "2020-11-03T09:10:25+00:00"
- },
{
"name": "spomky-labs/cbor-php",
- "version": "v2.1.0",
+ "version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/Spomky-Labs/cbor-php.git",
- "reference": "28e2712cfc0b48fae661a48ffc6896d7abe83684"
+ "reference": "499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Spomky-Labs/cbor-php/zipball/28e2712cfc0b48fae661a48ffc6896d7abe83684",
- "reference": "28e2712cfc0b48fae661a48ffc6896d7abe83684",
+ "url": "https://api.github.com/repos/Spomky-Labs/cbor-php/zipball/499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4",
+ "reference": "499d9bff0a6d59c4f1b813cc617fc3fd56d6dca4",
"shasum": ""
},
"require": {
- "brick/math": "^0.8.15|^0.9.0",
+ "brick/math": "^0.9|^0.10|^0.11|^0.12",
"ext-mbstring": "*",
- "php": ">=7.3"
+ "php": ">=8.0"
},
"require-dev": {
"ekino/phpstan-banned-code": "^1.0",
"ext-json": "*",
- "infection/infection": "^0.18|^0.25",
+ "infection/infection": "^0.29",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-beberlei-assert": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
- "phpunit/phpunit": "^9.5",
- "rector/rector": "^0.12",
+ "phpunit/phpunit": "^10.1|^11.0",
+ "qossmic/deptrac": "^2.0",
+ "rector/rector": "^1.0",
"roave/security-advisories": "dev-latest",
- "symplify/easy-coding-standard": "^10.0"
+ "symfony/var-dumper": "^6.0|^7.0",
+ "symplify/easy-coding-standard": "^12.0"
},
"suggest": {
"ext-bcmath": "GMP or BCMath extensions will drastically improve the library performance. BCMath extension needed to handle the Big Float and Decimal Fraction Tags",
@@ -7729,7 +7334,7 @@
],
"support": {
"issues": "https://github.com/Spomky-Labs/cbor-php/issues",
- "source": "https://github.com/Spomky-Labs/cbor-php/tree/v2.1.0"
+ "source": "https://github.com/Spomky-Labs/cbor-php/tree/3.1.0"
},
"funding": [
{
@@ -7741,7 +7346,118 @@
"type": "patreon"
}
],
- "time": "2021-12-13T12:46:26+00:00"
+ "time": "2024-07-18T08:37:03+00:00"
+ },
+ {
+ "name": "spomky-labs/pki-framework",
+ "version": "1.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Spomky-Labs/pki-framework.git",
+ "reference": "0b10c8b53366729417d6226ae89a665f9e2d61b6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Spomky-Labs/pki-framework/zipball/0b10c8b53366729417d6226ae89a665f9e2d61b6",
+ "reference": "0b10c8b53366729417d6226ae89a665f9e2d61b6",
+ "shasum": ""
+ },
+ "require": {
+ "brick/math": "^0.10|^0.11|^0.12",
+ "ext-mbstring": "*",
+ "php": ">=8.1"
+ },
+ "require-dev": {
+ "ekino/phpstan-banned-code": "^1.0",
+ "ext-gmp": "*",
+ "ext-openssl": "*",
+ "infection/infection": "^0.28",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpstan/extension-installer": "^1.3",
+ "phpstan/phpstan": "^1.8",
+ "phpstan/phpstan-beberlei-assert": "^1.0",
+ "phpstan/phpstan-deprecation-rules": "^1.0",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpstan/phpstan-strict-rules": "^1.3",
+ "phpunit/phpunit": "^10.1|^11.0",
+ "rector/rector": "^1.0",
+ "roave/security-advisories": "dev-latest",
+ "symfony/phpunit-bridge": "^6.4|^7.0",
+ "symfony/string": "^6.4|^7.0",
+ "symfony/var-dumper": "^6.4|^7.0",
+ "symplify/easy-coding-standard": "^12.0"
+ },
+ "suggest": {
+ "ext-bcmath": "For better performance (or GMP)",
+ "ext-gmp": "For better performance (or BCMath)",
+ "ext-openssl": "For OpenSSL based cyphering"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "SpomkyLabs\\Pki\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Joni Eskelinen",
+ "email": "jonieske@gmail.com",
+ "role": "Original developer"
+ },
+ {
+ "name": "Florent Morselli",
+ "email": "florent.morselli@spomky-labs.com",
+ "role": "Spomky-Labs PKI Framework developer"
+ }
+ ],
+ "description": "A PHP framework for managing Public Key Infrastructures. It comprises X.509 public key certificates, attribute certificates, certification requests and certification path validation.",
+ "homepage": "https://github.com/spomky-labs/pki-framework",
+ "keywords": [
+ "DER",
+ "Private Key",
+ "ac",
+ "algorithm identifier",
+ "asn.1",
+ "asn1",
+ "attribute certificate",
+ "certificate",
+ "certification request",
+ "cryptography",
+ "csr",
+ "decrypt",
+ "ec",
+ "encrypt",
+ "pem",
+ "pkcs",
+ "public key",
+ "rsa",
+ "sign",
+ "signature",
+ "verify",
+ "x.509",
+ "x.690",
+ "x509",
+ "x690"
+ ],
+ "support": {
+ "issues": "https://github.com/Spomky-Labs/pki-framework/issues",
+ "source": "https://github.com/Spomky-Labs/pki-framework/tree/1.2.1"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/Spomky",
+ "type": "github"
+ },
+ {
+ "url": "https://www.patreon.com/FlorentMorselli",
+ "type": "patreon"
+ }
+ ],
+ "time": "2024-03-30T18:03:49+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@@ -8076,6 +7792,85 @@
],
"time": "2024-05-31T15:07:36+00:00"
},
+ {
+ "name": "symfony/polyfill-uuid",
+ "version": "v1.30.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-uuid.git",
+ "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9",
+ "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "provide": {
+ "ext-uuid": "*"
+ },
+ "suggest": {
+ "ext-uuid": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "name": "symfony/polyfill",
+ "url": "https://github.com/symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Uuid\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Grégoire Pineau",
+ "email": "lyrixx@lyrixx.info"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for uuid functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "uuid"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-05-31T15:07:36+00:00"
+ },
{
"name": "symfony/process",
"version": "v5.4.40",
@@ -8225,6 +8020,80 @@
],
"time": "2024-07-22T10:25:37+00:00"
},
+ {
+ "name": "symfony/uid",
+ "version": "v7.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/uid.git",
+ "reference": "bb59febeecc81528ff672fad5dab7f06db8c8277"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/uid/zipball/bb59febeecc81528ff672fad5dab7f06db8c8277",
+ "reference": "bb59febeecc81528ff672fad5dab7f06db8c8277",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=8.2",
+ "symfony/polyfill-uuid": "^1.15"
+ },
+ "require-dev": {
+ "symfony/console": "^6.4|^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Uid\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Grégoire Pineau",
+ "email": "lyrixx@lyrixx.info"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an object-oriented API to generate and represent UIDs",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "UID",
+ "ulid",
+ "uuid"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/uid/tree/v7.1.1"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-05-31T14:57:53+00:00"
+ },
{
"name": "tecnickcom/tcpdf",
"version": "6.7.5",
@@ -8297,145 +8166,6 @@
],
"time": "2024-04-20T17:25:10+00:00"
},
- {
- "name": "thecodingmachine/safe",
- "version": "v1.3.3",
- "source": {
- "type": "git",
- "url": "https://github.com/thecodingmachine/safe.git",
- "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/thecodingmachine/safe/zipball/a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
- "reference": "a8ab0876305a4cdaef31b2350fcb9811b5608dbc",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2"
- },
- "require-dev": {
- "phpstan/phpstan": "^0.12",
- "squizlabs/php_codesniffer": "^3.2",
- "thecodingmachine/phpstan-strict-rules": "^0.12"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "0.1-dev"
- }
- },
- "autoload": {
- "files": [
- "deprecated/apc.php",
- "deprecated/libevent.php",
- "deprecated/mssql.php",
- "deprecated/stats.php",
- "lib/special_cases.php",
- "generated/apache.php",
- "generated/apcu.php",
- "generated/array.php",
- "generated/bzip2.php",
- "generated/calendar.php",
- "generated/classobj.php",
- "generated/com.php",
- "generated/cubrid.php",
- "generated/curl.php",
- "generated/datetime.php",
- "generated/dir.php",
- "generated/eio.php",
- "generated/errorfunc.php",
- "generated/exec.php",
- "generated/fileinfo.php",
- "generated/filesystem.php",
- "generated/filter.php",
- "generated/fpm.php",
- "generated/ftp.php",
- "generated/funchand.php",
- "generated/gmp.php",
- "generated/gnupg.php",
- "generated/hash.php",
- "generated/ibase.php",
- "generated/ibmDb2.php",
- "generated/iconv.php",
- "generated/image.php",
- "generated/imap.php",
- "generated/info.php",
- "generated/ingres-ii.php",
- "generated/inotify.php",
- "generated/json.php",
- "generated/ldap.php",
- "generated/libxml.php",
- "generated/lzf.php",
- "generated/mailparse.php",
- "generated/mbstring.php",
- "generated/misc.php",
- "generated/msql.php",
- "generated/mysql.php",
- "generated/mysqli.php",
- "generated/mysqlndMs.php",
- "generated/mysqlndQc.php",
- "generated/network.php",
- "generated/oci8.php",
- "generated/opcache.php",
- "generated/openssl.php",
- "generated/outcontrol.php",
- "generated/password.php",
- "generated/pcntl.php",
- "generated/pcre.php",
- "generated/pdf.php",
- "generated/pgsql.php",
- "generated/posix.php",
- "generated/ps.php",
- "generated/pspell.php",
- "generated/readline.php",
- "generated/rpminfo.php",
- "generated/rrd.php",
- "generated/sem.php",
- "generated/session.php",
- "generated/shmop.php",
- "generated/simplexml.php",
- "generated/sockets.php",
- "generated/sodium.php",
- "generated/solr.php",
- "generated/spl.php",
- "generated/sqlsrv.php",
- "generated/ssdeep.php",
- "generated/ssh2.php",
- "generated/stream.php",
- "generated/strings.php",
- "generated/swoole.php",
- "generated/uodbc.php",
- "generated/uopz.php",
- "generated/url.php",
- "generated/var.php",
- "generated/xdiff.php",
- "generated/xml.php",
- "generated/xmlrpc.php",
- "generated/yaml.php",
- "generated/yaz.php",
- "generated/zip.php",
- "generated/zlib.php"
- ],
- "psr-4": {
- "Safe\\": [
- "lib/",
- "deprecated/",
- "generated/"
- ]
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "PHP core functions that throw exceptions instead of returning FALSE on error",
- "support": {
- "issues": "https://github.com/thecodingmachine/safe/issues",
- "source": "https://github.com/thecodingmachine/safe/tree/v1.3.3"
- },
- "time": "2020-10-28T17:51:34+00:00"
- },
{
"name": "theseer/tokenizer",
"version": "1.2.3",
@@ -8598,25 +8328,43 @@
},
{
"name": "web-auth/cose-lib",
- "version": "v3.3.12",
+ "version": "4.4.0",
"source": {
"type": "git",
"url": "https://github.com/web-auth/cose-lib.git",
- "reference": "efa6ec2ba4e840bc1316a493973c9916028afeeb"
+ "reference": "2166016e48e0214f4f63320a7758a9386d14c92a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/web-auth/cose-lib/zipball/efa6ec2ba4e840bc1316a493973c9916028afeeb",
- "reference": "efa6ec2ba4e840bc1316a493973c9916028afeeb",
+ "url": "https://api.github.com/repos/web-auth/cose-lib/zipball/2166016e48e0214f4f63320a7758a9386d14c92a",
+ "reference": "2166016e48e0214f4f63320a7758a9386d14c92a",
"shasum": ""
},
"require": {
- "beberlei/assert": "^3.2",
+ "brick/math": "^0.9|^0.10|^0.11|^0.12",
"ext-json": "*",
- "ext-mbstring": "*",
"ext-openssl": "*",
- "fgrosse/phpasn1": "^2.1",
- "php": ">=7.2"
+ "php": ">=8.1",
+ "spomky-labs/pki-framework": "^1.0"
+ },
+ "require-dev": {
+ "ekino/phpstan-banned-code": "^1.0",
+ "infection/infection": "^0.29",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
+ "phpstan/extension-installer": "^1.3",
+ "phpstan/phpstan": "^1.7",
+ "phpstan/phpstan-deprecation-rules": "^1.0",
+ "phpstan/phpstan-phpunit": "^1.1",
+ "phpstan/phpstan-strict-rules": "^1.2",
+ "phpunit/phpunit": "^10.1|^11.0",
+ "qossmic/deptrac": "^2.0",
+ "rector/rector": "^1.0",
+ "symfony/phpunit-bridge": "^6.4|^7.0",
+ "symplify/easy-coding-standard": "^12.0"
+ },
+ "suggest": {
+ "ext-bcmath": "For better performance, please install either GMP (recommended) or BCMath extension",
+ "ext-gmp": "For better performance, please install either GMP (recommended) or BCMath extension"
},
"type": "library",
"autoload": {
@@ -8645,7 +8393,8 @@
"RFC8152"
],
"support": {
- "source": "https://github.com/web-auth/cose-lib/tree/v3.3.12"
+ "issues": "https://github.com/web-auth/cose-lib/issues",
+ "source": "https://github.com/web-auth/cose-lib/tree/4.4.0"
},
"funding": [
{
@@ -8657,119 +8406,57 @@
"type": "patreon"
}
],
- "time": "2021-12-04T12:13:35+00:00"
- },
- {
- "name": "web-auth/metadata-service",
- "version": "v3.3.12",
- "source": {
- "type": "git",
- "url": "https://github.com/web-auth/webauthn-metadata-service.git",
- "reference": "ef40d2b7b68c4964247d13fab52e2fa8dbd65246"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/web-auth/webauthn-metadata-service/zipball/ef40d2b7b68c4964247d13fab52e2fa8dbd65246",
- "reference": "ef40d2b7b68c4964247d13fab52e2fa8dbd65246",
- "shasum": ""
- },
- "require": {
- "beberlei/assert": "^3.2",
- "ext-json": "*",
- "league/uri": "^6.0",
- "php": ">=7.2",
- "psr/http-client": "^1.0",
- "psr/http-factory": "^1.0",
- "psr/log": "^1.1"
- },
- "suggest": {
- "web-token/jwt-key-mgmt": "Mandatory for fetching Metadata Statement from distant sources",
- "web-token/jwt-signature-algorithm-ecdsa": "Mandatory for fetching Metadata Statement from distant sources"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Webauthn\\MetadataService\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Florent Morselli",
- "homepage": "https://github.com/Spomky"
- },
- {
- "name": "All contributors",
- "homepage": "https://github.com/web-auth/metadata-service/contributors"
- }
- ],
- "description": "Metadata Service for FIDO2/Webauthn",
- "homepage": "https://github.com/web-auth",
- "keywords": [
- "FIDO2",
- "fido",
- "webauthn"
- ],
- "support": {
- "source": "https://github.com/web-auth/webauthn-metadata-service/tree/v3.3.12"
- },
- "funding": [
- {
- "url": "https://github.com/Spomky",
- "type": "github"
- },
- {
- "url": "https://www.patreon.com/FlorentMorselli",
- "type": "patreon"
- }
- ],
- "abandoned": "web-auth/webauthn-lib",
- "time": "2021-11-21T11:14:31+00:00"
+ "time": "2024-07-18T08:47:32+00:00"
},
{
"name": "web-auth/webauthn-lib",
- "version": "v3.3.12",
+ "version": "4.9.1",
"source": {
"type": "git",
"url": "https://github.com/web-auth/webauthn-lib.git",
- "reference": "5ef9b21c8e9f8a817e524ac93290d08a9f065b33"
+ "reference": "fd7a0943c663b325e92ad562c2bcc943e77beeac"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/5ef9b21c8e9f8a817e524ac93290d08a9f065b33",
- "reference": "5ef9b21c8e9f8a817e524ac93290d08a9f065b33",
+ "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/fd7a0943c663b325e92ad562c2bcc943e77beeac",
+ "reference": "fd7a0943c663b325e92ad562c2bcc943e77beeac",
"shasum": ""
},
"require": {
- "beberlei/assert": "^3.2",
"ext-json": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
- "fgrosse/phpasn1": "^2.1",
- "php": ">=7.2",
+ "lcobucci/clock": "^2.2|^3.0",
+ "paragonie/constant_time_encoding": "^2.6|^3.0",
+ "php": ">=8.1",
+ "psr/clock": "^1.0",
+ "psr/event-dispatcher": "^1.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
- "psr/http-message": "^1.0",
- "psr/log": "^1.1",
- "ramsey/uuid": "^3.8|^4.0",
- "spomky-labs/base64url": "^2.0",
- "spomky-labs/cbor-php": "^1.0|^2.0",
- "symfony/process": "^3.0|^4.0|^5.0",
- "thecodingmachine/safe": "^1.1",
- "web-auth/cose-lib": "self.version",
- "web-auth/metadata-service": "self.version"
+ "psr/log": "^1.0|^2.0|^3.0",
+ "spomky-labs/cbor-php": "^3.0",
+ "spomky-labs/pki-framework": "^1.0",
+ "symfony/deprecation-contracts": "^3.2",
+ "symfony/uid": "^6.1|^7.0",
+ "web-auth/cose-lib": "^4.2.3"
},
"suggest": {
+ "phpdocumentor/reflection-docblock": "As of 4.5.x, the phpdocumentor/reflection-docblock component will become mandatory for converting objects such as the Metadata Statement",
+ "psr/clock-implementation": "As of 4.5.x, the PSR Clock implementation will replace lcobucci/clock",
"psr/log-implementation": "Recommended to receive logs from the library",
- "web-token/jwt-key-mgmt": "Mandatory for the AndroidSafetyNet Attestation Statement support",
- "web-token/jwt-signature-algorithm-ecdsa": "Recommended for the AndroidSafetyNet Attestation Statement support",
- "web-token/jwt-signature-algorithm-eddsa": "Recommended for the AndroidSafetyNet Attestation Statement support",
- "web-token/jwt-signature-algorithm-rsa": "Mandatory for the AndroidSafetyNet Attestation Statement support"
+ "symfony/event-dispatcher": "Recommended to use dispatched events",
+ "symfony/property-access": "As of 4.5.x, the symfony/serializer component will become mandatory for converting objects such as the Metadata Statement",
+ "symfony/property-info": "As of 4.5.x, the symfony/serializer component will become mandatory for converting objects such as the Metadata Statement",
+ "symfony/serializer": "As of 4.5.x, the symfony/serializer component will become mandatory for converting objects such as the Metadata Statement",
+ "web-token/jwt-library": "Mandatory for fetching Metadata Statement from distant sources"
},
"type": "library",
+ "extra": {
+ "thanks": {
+ "name": "web-auth/webauthn-framework",
+ "url": "https://github.com/web-auth/webauthn-framework"
+ }
+ },
"autoload": {
"psr-4": {
"Webauthn\\": "src/"
@@ -8797,7 +8484,7 @@
"webauthn"
],
"support": {
- "source": "https://github.com/web-auth/webauthn-lib/tree/v3.3.12"
+ "source": "https://github.com/web-auth/webauthn-lib/tree/4.9.1"
},
"funding": [
{
@@ -8809,7 +8496,7 @@
"type": "patreon"
}
],
- "time": "2022-02-18T07:13:44+00:00"
+ "time": "2024-07-16T18:36:36+00:00"
}
],
"aliases": [],
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon
index 8ba6ecf8f5..6cb5a70687 100644
--- a/phpstan-baseline.neon
+++ b/phpstan-baseline.neon
@@ -14050,6 +14050,46 @@ parameters:
count: 1
path: src/WebAuthn/CBORDecoder.php
+ -
+ message: "#^Call to static method Webmozart\\\\Assert\\\\Assert\\:\\:isInstanceOf\\(\\) with Webauthn\\\\PublicKeyCredentialCreationOptions and 'Webauthn\\\\\\\\PublicKeyCredentialCreationOptions' will always evaluate to true\\.$#"
+ count: 1
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Call to static method Webmozart\\\\Assert\\\\Assert\\:\\:isInstanceOf\\(\\) with Webauthn\\\\PublicKeyCredentialRequestOptions and 'Webauthn\\\\\\\\PublicKeyCredentialRequestOptions' will always evaluate to true\\.$#"
+ count: 1
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Cannot access offset 'authenticatorData' on mixed\\.$#"
+ count: 2
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Cannot access offset 'clientDataJSON' on mixed\\.$#"
+ count: 4
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Cannot access offset 'response' on mixed\\.$#"
+ count: 6
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Parameter \\#1 \\$haystack of function str_ends_with expects string, mixed given\\.$#"
+ count: 1
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function rtrim expects string, mixed given\\.$#"
+ count: 1
+ path: src/WebAuthn/WebauthnLibServer.php
+
+ -
+ message: "#^Parameter \\#1 \\$string of function sodium_base642bin expects string, mixed given\\.$#"
+ count: 3
+ path: src/WebAuthn/WebauthnLibServer.php
+
-
message: "#^Method PhpMyAdmin\\\\ZipExtension\\:\\:getContents\\(\\) should return array\\{error\\: string, data\\: string\\} but returns array\\{error\\: '', data\\: string\\|false\\}\\.$#"
count: 1
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index 98f508930b..f0366a5169 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -11989,6 +11989,84 @@
* }]]>
+
+
+
+
+
+
+
+
+
+
+
+
+ twofactor) implements PublicKeyCredentialSourceRepository {]]>
+
+
+ 'cross-platform',
+ 'userVerification' => 'discouraged',
+ ])]]>
+
+ $challenge,
+ 'allowCredentials' => $allowedCredentials,
+ 'rpId' => $host,
+ 'timeout' => 60000,
+ ])]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Plugins/TwoFactor/WebAuthn.php b/src/Plugins/TwoFactor/WebAuthn.php
index b8a345ced2..d89054c54a 100644
--- a/src/Plugins/TwoFactor/WebAuthn.php
+++ b/src/Plugins/TwoFactor/WebAuthn.php
@@ -13,7 +13,7 @@ use PhpMyAdmin\WebAuthn\Server;
use PhpMyAdmin\WebAuthn\WebauthnLibServer;
use SodiumException;
use Throwable;
-use Webauthn\Server as WebauthnServer;
+use Webauthn\PublicKeyCredential;
use Webmozart\Assert\Assert;
use function __;
@@ -61,7 +61,7 @@ class WebAuthn extends TwoFactorPlugin
private function createServer(): Server
{
- return class_exists(WebauthnServer::class) ? new WebauthnLibServer($this->twofactor) : new CustomServer();
+ return class_exists(PublicKeyCredential::class) ? new WebauthnLibServer($this->twofactor) : new CustomServer();
}
public function setServer(Server $server): void
diff --git a/src/WebAuthn/WebauthnLibServer.php b/src/WebAuthn/WebauthnLibServer.php
index ef64da876e..16d4136f90 100644
--- a/src/WebAuthn/WebauthnLibServer.php
+++ b/src/WebAuthn/WebauthnLibServer.php
@@ -4,33 +4,78 @@ declare(strict_types=1);
namespace PhpMyAdmin\WebAuthn;
+use Cose\Algorithm\ManagerFactory;
+use Cose\Algorithm\Signature\ECDSA;
+use Cose\Algorithm\Signature\EdDSA;
+use Cose\Algorithm\Signature\RSA;
use PhpMyAdmin\TwoFactor;
use Psr\Http\Message\ServerRequestInterface;
+use Webauthn\AttestationStatement\AttestationObjectLoader;
+use Webauthn\AttestationStatement\AttestationStatementSupportManager;
+use Webauthn\AttestationStatement\NoneAttestationStatementSupport;
+use Webauthn\AuthenticationExtensions\AuthenticationExtensionsClientInputs;
+use Webauthn\AuthenticationExtensions\ExtensionOutputCheckerHandler;
+use Webauthn\AuthenticatorAssertionResponse;
+use Webauthn\AuthenticatorAssertionResponseValidator;
+use Webauthn\AuthenticatorAttestationResponse;
+use Webauthn\AuthenticatorAttestationResponseValidator;
use Webauthn\AuthenticatorSelectionCriteria;
use Webauthn\PublicKeyCredentialCreationOptions;
use Webauthn\PublicKeyCredentialDescriptor;
+use Webauthn\PublicKeyCredentialLoader;
+use Webauthn\PublicKeyCredentialParameters;
use Webauthn\PublicKeyCredentialRequestOptions;
use Webauthn\PublicKeyCredentialRpEntity;
use Webauthn\PublicKeyCredentialSource;
use Webauthn\PublicKeyCredentialSourceRepository;
use Webauthn\PublicKeyCredentialUserEntity;
-use Webauthn\Server as WebauthnServer;
+use Webauthn\TokenBinding\IgnoreTokenBindingHandler;
use Webauthn\TrustPath\EmptyTrustPath;
use Webmozart\Assert\Assert;
use function array_map;
use function base64_encode;
use function json_decode;
+use function json_encode;
+use function random_bytes;
+use function rtrim;
use function sodium_base642bin;
use function sodium_bin2base64;
+use function str_ends_with;
+use const JSON_THROW_ON_ERROR;
use const SODIUM_BASE64_VARIANT_ORIGINAL;
use const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING;
final class WebauthnLibServer implements Server
{
+ private int $timeout = 60000;
+
+ /** @phpstan-var int<1, max> */
+ private int $challengeSize = 32;
+
+ private ManagerFactory $coseAlgorithmManagerFactory;
+
+ /** @var string[] */
+ private array $selectedAlgorithms;
+
public function __construct(private TwoFactor $twofactor)
{
+ $this->coseAlgorithmManagerFactory = new ManagerFactory();
+ $this->coseAlgorithmManagerFactory->add('RS1', new RSA\RS1());
+ $this->coseAlgorithmManagerFactory->add('RS256', new RSA\RS256());
+ $this->coseAlgorithmManagerFactory->add('RS384', new RSA\RS384());
+ $this->coseAlgorithmManagerFactory->add('RS512', new RSA\RS512());
+ $this->coseAlgorithmManagerFactory->add('PS256', new RSA\PS256());
+ $this->coseAlgorithmManagerFactory->add('PS384', new RSA\PS384());
+ $this->coseAlgorithmManagerFactory->add('PS512', new RSA\PS512());
+ $this->coseAlgorithmManagerFactory->add('ES256', new ECDSA\ES256());
+ $this->coseAlgorithmManagerFactory->add('ES256K', new ECDSA\ES256K());
+ $this->coseAlgorithmManagerFactory->add('ES384', new ECDSA\ES384());
+ $this->coseAlgorithmManagerFactory->add('ES512', new ECDSA\ES512());
+ $this->coseAlgorithmManagerFactory->add('Ed25519', new EdDSA\Ed25519());
+
+ $this->selectedAlgorithms = ['RS256', 'RS512', 'PS256', 'PS512', 'ES256', 'ES512', 'Ed25519'];
}
/** @inheritDoc */
@@ -38,17 +83,31 @@ final class WebauthnLibServer implements Server
{
$userEntity = new PublicKeyCredentialUserEntity($userName, $userId, $userName);
$relyingPartyEntity = new PublicKeyCredentialRpEntity('phpMyAdmin (' . $relyingPartyId . ')', $relyingPartyId);
- $publicKeyCredentialSourceRepository = $this->createPublicKeyCredentialSourceRepository();
- $server = new WebauthnServer($relyingPartyEntity, $publicKeyCredentialSourceRepository);
- $publicKeyCredentialCreationOptions = $server->generatePublicKeyCredentialCreationOptions(
+
+ $coseAlgorithmManager = $this->coseAlgorithmManagerFactory->generate(...$this->selectedAlgorithms);
+ $publicKeyCredentialParametersList = [];
+ foreach ($coseAlgorithmManager->all() as $algorithm) {
+ $publicKeyCredentialParametersList[] = new PublicKeyCredentialParameters(
+ PublicKeyCredentialDescriptor::CREDENTIAL_TYPE_PUBLIC_KEY,
+ $algorithm::identifier(),
+ );
+ }
+
+ $criteria = AuthenticatorSelectionCriteria::createFromArray([
+ 'authenticatorAttachment' => 'cross-platform',
+ 'userVerification' => 'discouraged',
+ ]);
+ $publicKeyCredentialCreationOptions = PublicKeyCredentialCreationOptions::create(
+ $relyingPartyEntity,
$userEntity,
- PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE,
- [],
- AuthenticatorSelectionCriteria::createFromArray([
- 'authenticatorAttachment' => 'cross-platform',
- 'userVerification' => 'discouraged',
- ]),
- );
+ random_bytes($this->challengeSize),
+ $publicKeyCredentialParametersList,
+ )
+ ->setAuthenticatorSelection($criteria)
+ ->setAttestation(PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE)
+ ->setExtensions(new AuthenticationExtensionsClientInputs())
+ ->setTimeout($this->timeout);
+
/** @psalm-var array{
* challenge: non-empty-string,
* rp: array{name: non-empty-string, id: non-empty-string},
@@ -58,7 +117,7 @@ final class WebauthnLibServer implements Server
* timeout: positive-int,
* attestation: non-empty-string
* } $creationOptions */
- $creationOptions = $publicKeyCredentialCreationOptions->jsonSerialize();
+ $creationOptions = $this->normalize($publicKeyCredentialCreationOptions);
$creationOptions['challenge'] = sodium_bin2base64(
sodium_base642bin($creationOptions['challenge'], SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING),
SODIUM_BASE64_VARIANT_ORIGINAL,
@@ -78,7 +137,6 @@ final class WebauthnLibServer implements Server
$userEntity = new PublicKeyCredentialUserEntity($userName, $userId, $userName);
$relyingPartyEntity = new PublicKeyCredentialRpEntity('phpMyAdmin (' . $relyingPartyId . ')', $relyingPartyId);
$publicKeyCredentialSourceRepository = $this->createPublicKeyCredentialSourceRepository();
- $server = new WebauthnServer($relyingPartyEntity, $publicKeyCredentialSourceRepository);
$credentialSources = $publicKeyCredentialSourceRepository->findAllForUserEntity($userEntity);
$allowedCredentials = array_map(
static fn (
@@ -86,17 +144,22 @@ final class WebauthnLibServer implements Server
): PublicKeyCredentialDescriptor => $credential->getPublicKeyCredentialDescriptor(),
$credentialSources,
);
- $publicKeyCredentialRequestOptions = $server->generatePublicKeyCredentialRequestOptions(
- 'discouraged',
- $allowedCredentials,
- );
+
+ $challenge = random_bytes($this->challengeSize);
+ $publicKeyCredentialRequestOptions = PublicKeyCredentialRequestOptions::create($challenge)
+ ->setRpId($relyingPartyEntity->getId())
+ ->setUserVerification(PublicKeyCredentialRequestOptions::USER_VERIFICATION_REQUIREMENT_DISCOURAGED)
+ ->allowCredentials(...$allowedCredentials)
+ ->setTimeout($this->timeout)
+ ->setExtensions(new AuthenticationExtensionsClientInputs());
+
/**
* @psalm-var array{
* challenge: string,
* allowCredentials?: list
* } $requestOptions
*/
- $requestOptions = $publicKeyCredentialRequestOptions->jsonSerialize();
+ $requestOptions = $this->normalize($publicKeyCredentialRequestOptions);
$requestOptions['challenge'] = sodium_bin2base64(
sodium_base642bin($requestOptions['challenge'], SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING),
SODIUM_BASE64_VARIANT_ORIGINAL,
@@ -127,9 +190,7 @@ final class WebauthnLibServer implements Server
);
$userEntity = new PublicKeyCredentialUserEntity($this->twofactor->user, $userHandle, $this->twofactor->user);
$host = $request->getUri()->getHost();
- $relyingPartyEntity = new PublicKeyCredentialRpEntity('phpMyAdmin (' . $host . ')', $host);
$publicKeyCredentialSourceRepository = $this->createPublicKeyCredentialSourceRepository();
- $server = new WebauthnServer($relyingPartyEntity, $publicKeyCredentialSourceRepository);
$requestOptions = PublicKeyCredentialRequestOptions::createFromArray([
'challenge' => $challenge,
'allowCredentials' => $allowedCredentials,
@@ -137,7 +198,52 @@ final class WebauthnLibServer implements Server
'timeout' => 60000,
]);
Assert::isInstanceOf($requestOptions, PublicKeyCredentialRequestOptions::class);
- $server->loadAndCheckAssertionResponse($assertionResponseJson, $requestOptions, $userEntity, $request);
+
+ $attestationStatementSupportManager = new AttestationStatementSupportManager();
+ $attestationStatementSupportManager->add(new NoneAttestationStatementSupport());
+ $attestationObjectLoader = AttestationObjectLoader::create($attestationStatementSupportManager);
+ $publicKeyCredentialLoader = PublicKeyCredentialLoader::create($attestationObjectLoader);
+
+ $assertionResponseDecoded = json_decode($assertionResponseJson, true, flags: JSON_THROW_ON_ERROR);
+ $assertionResponseDecoded['response']['authenticatorData'] = sodium_bin2base64(
+ sodium_base642bin(
+ $assertionResponseDecoded['response']['authenticatorData'],
+ SODIUM_BASE64_VARIANT_ORIGINAL,
+ ),
+ SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING,
+ );
+ $assertionResponseDecoded['response']['clientDataJSON'] = sodium_bin2base64(
+ sodium_base642bin(
+ $assertionResponseDecoded['response']['clientDataJSON'],
+ SODIUM_BASE64_VARIANT_ORIGINAL,
+ ),
+ SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING,
+ );
+
+ $publicKeyCredential = $publicKeyCredentialLoader->load(
+ json_encode($assertionResponseDecoded, JSON_THROW_ON_ERROR),
+ );
+ $authenticatorResponse = $publicKeyCredential->getResponse();
+ Assert::isInstanceOf(
+ $authenticatorResponse,
+ AuthenticatorAssertionResponse::class,
+ 'Not an authenticator assertion response',
+ );
+
+ $authenticatorAssertionResponseValidator = new AuthenticatorAssertionResponseValidator(
+ $publicKeyCredentialSourceRepository,
+ new IgnoreTokenBindingHandler(),
+ new ExtensionOutputCheckerHandler(),
+ $this->coseAlgorithmManagerFactory->generate(...$this->selectedAlgorithms),
+ );
+
+ $authenticatorAssertionResponseValidator->check(
+ $publicKeyCredential->getRawId(),
+ $authenticatorResponse,
+ $requestOptions,
+ $request,
+ $userEntity->getId(),
+ );
}
/** @inheritDoc */
@@ -146,16 +252,14 @@ final class WebauthnLibServer implements Server
string $credentialCreationOptions,
ServerRequestInterface $request,
): array {
- $creationOptions = json_decode($credentialCreationOptions, true);
+ $creationOptions = json_decode($credentialCreationOptions, true, flags: JSON_THROW_ON_ERROR);
Assert::isArray($creationOptions);
Assert::keyExists($creationOptions, 'challenge');
Assert::keyExists($creationOptions, 'user');
Assert::isArray($creationOptions['user']);
Assert::keyExists($creationOptions['user'], 'id');
$host = $request->getUri()->getHost();
- $relyingPartyEntity = new PublicKeyCredentialRpEntity('phpMyAdmin (' . $host . ')', $host);
$publicKeyCredentialSourceRepository = $this->createPublicKeyCredentialSourceRepository();
- $server = new WebauthnServer($relyingPartyEntity, $publicKeyCredentialSourceRepository);
$creationOptionsArray = [
'rp' => ['name' => 'phpMyAdmin (' . $host . ')', 'id' => $host],
'pubKeyCredParams' => [
@@ -182,13 +286,45 @@ final class WebauthnLibServer implements Server
];
$credentialCreationOptions = PublicKeyCredentialCreationOptions::createFromArray($creationOptionsArray);
Assert::isInstanceOf($credentialCreationOptions, PublicKeyCredentialCreationOptions::class);
- $publicKeyCredentialSource = $server->loadAndCheckAttestationResponse(
- $attestationResponse,
+
+ $attestationStatementSupportManager = new AttestationStatementSupportManager();
+ $attestationStatementSupportManager->add(new NoneAttestationStatementSupport());
+ $attestationObjectLoader = AttestationObjectLoader::create($attestationStatementSupportManager);
+ $publicKeyCredentialLoader = PublicKeyCredentialLoader::create($attestationObjectLoader);
+
+ $attestationResponseDecoded = json_decode($attestationResponse, true, flags: JSON_THROW_ON_ERROR);
+ $attestationResponseDecoded['response']['clientDataJSON'] = sodium_bin2base64(
+ sodium_base642bin(
+ $attestationResponseDecoded['response']['clientDataJSON'],
+ SODIUM_BASE64_VARIANT_ORIGINAL,
+ ),
+ SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING,
+ );
+
+ $publicKeyCredential = $publicKeyCredentialLoader->load(
+ json_encode($attestationResponseDecoded, JSON_THROW_ON_ERROR),
+ );
+ $authenticatorResponse = $publicKeyCredential->getResponse();
+ Assert::isInstanceOf(
+ $authenticatorResponse,
+ AuthenticatorAttestationResponse::class,
+ 'Not an authenticator attestation response',
+ );
+
+ $authenticatorAttestationResponseValidator = new AuthenticatorAttestationResponseValidator(
+ $attestationStatementSupportManager,
+ $publicKeyCredentialSourceRepository,
+ new IgnoreTokenBindingHandler(),
+ new ExtensionOutputCheckerHandler(),
+ );
+
+ $publicKeyCredentialSource = $authenticatorAttestationResponseValidator->check(
+ $authenticatorResponse,
$credentialCreationOptions,
$request,
);
- return $publicKeyCredentialSource->jsonSerialize();
+ return $this->normalize($publicKeyCredentialSource);
}
/** @infection-ignore-all */
@@ -229,7 +365,10 @@ final class WebauthnLibServer implements Server
{
$data = $this->read();
$id = $publicKeyCredentialSource->getPublicKeyCredentialId();
- $data[base64_encode($id)] = $publicKeyCredentialSource->jsonSerialize();
+ $encoded = json_encode($publicKeyCredentialSource, JSON_THROW_ON_ERROR);
+ $normalized = json_decode($encoded, true, flags: JSON_THROW_ON_ERROR);
+ Assert::isArray($normalized);
+ $data[base64_encode($id)] = $normalized;
$this->write($data);
}
@@ -239,6 +378,10 @@ final class WebauthnLibServer implements Server
/** @psalm-var list $credentials */
$credentials = $this->twoFactor->config['settings']['credentials'];
foreach ($credentials as &$credential) {
+ if (str_ends_with($credential['userHandle'], '=')) {
+ $credential['userHandle'] = rtrim($credential['userHandle'], '=');
+ }
+
if (isset($credential['trustPath'])) {
continue;
}
@@ -256,4 +399,14 @@ final class WebauthnLibServer implements Server
}
};
}
+
+ /** @return mixed[] */
+ private function normalize(object $object): array
+ {
+ $encoded = json_encode($object, JSON_THROW_ON_ERROR);
+ $normalized = json_decode($encoded, true, flags: JSON_THROW_ON_ERROR);
+ Assert::isArray($normalized);
+
+ return $normalized;
+ }
}
diff --git a/tests/unit/WebAuthn/WebauthnLibServerTest.php b/tests/unit/WebAuthn/WebauthnLibServerTest.php
index e5447a42a5..970fb7f440 100644
--- a/tests/unit/WebAuthn/WebauthnLibServerTest.php
+++ b/tests/unit/WebAuthn/WebauthnLibServerTest.php
@@ -11,10 +11,9 @@ use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
use PHPUnit\Framework\TestCase;
use Psr\Http\Message\UriInterface;
-use Webauthn\Server as WebauthnServer;
+use Webauthn\PublicKeyCredential;
use Webauthn\TrustPath\EmptyTrustPath;
-use function base64_encode;
use function class_exists;
#[CoversClass(WebauthnLibServer::class)]
@@ -24,7 +23,7 @@ final class WebauthnLibServerTest extends TestCase
{
parent::setUp();
- if (class_exists(WebauthnServer::class)) {
+ if (class_exists(PublicKeyCredential::class)) {
return;
}
@@ -45,7 +44,7 @@ final class WebauthnLibServerTest extends TestCase
self::assertSame('test.localhost', $options['rp']['id']);
self::assertSame('user_name', $options['user']['name']);
self::assertSame('user_name', $options['user']['displayName']);
- self::assertSame(base64_encode('user_id'), $options['user']['id']);
+ self::assertSame('dXNlcl9pZA', $options['user']['id']);
self::assertArrayHasKey('authenticatorAttachment', $options['authenticatorSelection']);
self::assertSame('cross-platform', $options['authenticatorSelection']['authenticatorAttachment']);
}
@@ -156,7 +155,8 @@ final class WebauthnLibServerTest extends TestCase
'credentialPublicKey' => 'pQECAyYgASFYIJV56vRrFusoDf9hm3iDmllcxxXzzKyO9WruKw4kWx7zIlgg_nq63l8IMJcIdKDJcXRh9hoz0L-nVwP1Oxil3_oNQYs',
'userHandle' => 'Zm9v',
'counter' => 123,
- 'otherUI' => null,
+ 'backupEligible' => false,
+ 'backupStatus' => false,
],
],
$twoFactor->config['settings']['credentials'],
@@ -196,7 +196,9 @@ final class WebauthnLibServerTest extends TestCase
'credentialPublicKey' => 'pQECAyYgASFYIBw_HArIcANWNOBOxq3hH8lrHo9a17nQDxlqwybjDpHEIlggu3QUKIbALqsGuHfJI3LTKJSNmk0YCFb5oz1hjJidRMk',
'userHandle' => 'MJr5sD0WitVwZM0eoSO6kWhyseT67vc3oQdk_k1VdZQ',
'counter' => 0,
- 'otherUI' => null,
+ 'backupEligible' => false,
+ 'backupStatus' => false,
+ 'uvInitialized' => false,
],
$credential,
);