diff --git a/composer.json b/composer.json index 177c663b1..2b53c05da 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,7 @@ "symfony/routing": "^5.4.24", "symfony/translation": "^6.4.4", "wapmorgan/mp3info": "^0.1.0", - "web-auth/webauthn-lib": "^4.8" + "web-auth/webauthn-lib": "^4.9.1" }, "scripts": { "lint": "find . -name \\*.php -print0 | xargs -0 -n1 php -l" diff --git a/composer.lock b/composer.lock index c249521fc..f2d53ea00 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": "1122a291745dde5797d98832c2de4f9d", + "content-hash": "22092057ff31e1a7e6bb5b0e2efaffd5", "packages": [ { "name": "aws/aws-crt-php", @@ -6350,127 +6350,47 @@ ], "time": "2024-02-05T21:00:39+00:00" }, - { - "name": "web-auth/metadata-service", - "version": "4.8.5", - "source": { - "type": "git", - "url": "https://github.com/web-auth/webauthn-metadata-service.git", - "reference": "fb7c1f107639285fab90f870aab38360252c82f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-metadata-service/zipball/fb7c1f107639285fab90f870aab38360252c82f5", - "reference": "fb7c1f107639285fab90f870aab38360252c82f5", - "shasum": "" - }, - "require": { - "ext-json": "*", - "lcobucci/clock": "^2.2|^3.0", - "paragonie/constant_time_encoding": "^2.6", - "php": ">=8.1", - "psr/clock": "^1.0", - "psr/event-dispatcher": "^1.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/log": "^1.0|^2.0|^3.0", - "spomky-labs/pki-framework": "^1.0", - "symfony/deprecation-contracts": "^3.2" - }, - "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", - "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\\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/4.8.5" - }, - "funding": [ - { - "url": "https://github.com/Spomky", - "type": "github" - }, - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "time": "2024-03-13T07:16:02+00:00" - }, { "name": "web-auth/webauthn-lib", - "version": "4.8.5", + "version": "4.9.1", "source": { "type": "git", "url": "https://github.com/web-auth/webauthn-lib.git", - "reference": "925873eb504a1db8a77dc2b4d2b578334736fa16" + "reference": "fd7a0943c663b325e92ad562c2bcc943e77beeac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/925873eb504a1db8a77dc2b4d2b578334736fa16", - "reference": "925873eb504a1db8a77dc2b4d2b578334736fa16", + "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/fd7a0943c663b325e92ad562c2bcc943e77beeac", + "reference": "fd7a0943c663b325e92ad562c2bcc943e77beeac", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "paragonie/constant_time_encoding": "^2.6", + "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/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", - "web-auth/metadata-service": "self.version" + "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", "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 the AndroidSafetyNet Attestation Statement support" + "web-token/jwt-library": "Mandatory for fetching Metadata Statement from distant sources" }, "type": "library", "extra": { @@ -6506,7 +6426,7 @@ "webauthn" ], "support": { - "source": "https://github.com/web-auth/webauthn-lib/tree/4.8.5" + "source": "https://github.com/web-auth/webauthn-lib/tree/4.9.1" }, "funding": [ { @@ -6518,7 +6438,7 @@ "type": "patreon" } ], - "time": "2024-04-08T10:04:23+00:00" + "time": "2024-07-16T18:36:36+00:00" } ], "packages-dev": [], diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php index 009ccaa7d..c5fc5a15c 100644 --- a/composer/autoload_classmap.php +++ b/composer/autoload_classmap.php @@ -3646,18 +3646,23 @@ 'Webauthn\\Credential' => $vendorDir . '/web-auth/webauthn-lib/src/Credential.php', 'Webauthn\\Denormalizer\\AttestationObjectDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AttestationObjectDenormalizer.php', 'Webauthn\\Denormalizer\\AttestationStatementDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AttestationStatementDenormalizer.php', + 'Webauthn\\Denormalizer\\AttestedCredentialDataNormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AttestedCredentialDataNormalizer.php', + 'Webauthn\\Denormalizer\\AuthenticationExtensionNormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionNormalizer.php', 'Webauthn\\Denormalizer\\AuthenticationExtensionsDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionsDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorAssertionResponseDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorAttestationResponseDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorDataDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorDataDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorResponseDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorResponseDenormalizer.php', 'Webauthn\\Denormalizer\\CollectedClientDataDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/CollectedClientDataDenormalizer.php', + 'Webauthn\\Denormalizer\\ExtensionDescriptorDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/ExtensionDescriptorDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDenormalizer.php', + 'Webauthn\\Denormalizer\\PublicKeyCredentialDescriptorNormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDescriptorNormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialOptionsDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialParametersDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialSourceDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialUserEntityDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php', 'Webauthn\\Denormalizer\\TrustPathDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/TrustPathDenormalizer.php', + 'Webauthn\\Denormalizer\\VerificationMethodANDCombinationsDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/VerificationMethodANDCombinationsDenormalizer.php', 'Webauthn\\Denormalizer\\WebauthnSerializerFactory' => $vendorDir . '/web-auth/webauthn-lib/src/Denormalizer/WebauthnSerializerFactory.php', 'Webauthn\\Event\\AttestationObjectLoaded' => $vendorDir . '/web-auth/webauthn-lib/src/Event/AttestationObjectLoaded.php', 'Webauthn\\Event\\AttestationStatementLoaded' => $vendorDir . '/web-auth/webauthn-lib/src/Event/AttestationStatementLoaded.php', @@ -3665,74 +3670,92 @@ 'Webauthn\\Event\\AuthenticatorAssertionResponseValidationSucceededEvent' => $vendorDir . '/web-auth/webauthn-lib/src/Event/AuthenticatorAssertionResponseValidationSucceededEvent.php', 'Webauthn\\Event\\AuthenticatorAttestationResponseValidationFailedEvent' => $vendorDir . '/web-auth/webauthn-lib/src/Event/AuthenticatorAttestationResponseValidationFailedEvent.php', 'Webauthn\\Event\\AuthenticatorAttestationResponseValidationSucceededEvent' => $vendorDir . '/web-auth/webauthn-lib/src/Event/AuthenticatorAttestationResponseValidationSucceededEvent.php', + 'Webauthn\\Event\\BeforeCertificateChainValidation' => $vendorDir . '/web-auth/webauthn-lib/src/Event/BeforeCertificateChainValidation.php', + 'Webauthn\\Event\\CanDispatchEvents' => $vendorDir . '/web-auth/webauthn-lib/src/Event/CanDispatchEvents.php', + 'Webauthn\\Event\\CertificateChainValidationFailed' => $vendorDir . '/web-auth/webauthn-lib/src/Event/CertificateChainValidationFailed.php', + 'Webauthn\\Event\\CertificateChainValidationSucceeded' => $vendorDir . '/web-auth/webauthn-lib/src/Event/CertificateChainValidationSucceeded.php', + 'Webauthn\\Event\\MetadataStatementFound' => $vendorDir . '/web-auth/webauthn-lib/src/Event/MetadataStatementFound.php', + 'Webauthn\\Event\\NullEventDispatcher' => $vendorDir . '/web-auth/webauthn-lib/src/Event/NullEventDispatcher.php', + 'Webauthn\\Event\\WebauthnEvent' => $vendorDir . '/web-auth/webauthn-lib/src/Event/WebauthnEvent.php', 'Webauthn\\Exception\\AttestationStatementException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/AttestationStatementException.php', 'Webauthn\\Exception\\AttestationStatementLoadingException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/AttestationStatementLoadingException.php', 'Webauthn\\Exception\\AttestationStatementVerificationException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/AttestationStatementVerificationException.php', 'Webauthn\\Exception\\AuthenticationExtensionException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/AuthenticationExtensionException.php', 'Webauthn\\Exception\\AuthenticatorResponseVerificationException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/AuthenticatorResponseVerificationException.php', + 'Webauthn\\Exception\\CertificateChainException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/CertificateChainException.php', + 'Webauthn\\Exception\\CertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/CertificateException.php', + 'Webauthn\\Exception\\CertificateRevocationListException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/CertificateRevocationListException.php', 'Webauthn\\Exception\\CounterException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/CounterException.php', + 'Webauthn\\Exception\\ExpiredCertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/ExpiredCertificateException.php', 'Webauthn\\Exception\\InvalidAttestationStatementException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/InvalidAttestationStatementException.php', + 'Webauthn\\Exception\\InvalidCertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/InvalidCertificateException.php', 'Webauthn\\Exception\\InvalidDataException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/InvalidDataException.php', 'Webauthn\\Exception\\InvalidTrustPathException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/InvalidTrustPathException.php', 'Webauthn\\Exception\\InvalidUserHandleException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/InvalidUserHandleException.php', + 'Webauthn\\Exception\\MetadataServiceException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/MetadataServiceException.php', + 'Webauthn\\Exception\\MetadataStatementException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/MetadataStatementException.php', + 'Webauthn\\Exception\\MetadataStatementLoadingException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/MetadataStatementLoadingException.php', + 'Webauthn\\Exception\\MissingMetadataStatementException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/MissingMetadataStatementException.php', + 'Webauthn\\Exception\\RevokedCertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/RevokedCertificateException.php', 'Webauthn\\Exception\\UnsupportedFeatureException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/UnsupportedFeatureException.php', 'Webauthn\\Exception\\WebauthnException' => $vendorDir . '/web-auth/webauthn-lib/src/Exception/WebauthnException.php', - 'Webauthn\\MetadataService\\CanLogData' => $vendorDir . '/web-auth/metadata-service/src/CanLogData.php', - 'Webauthn\\MetadataService\\CertificateChain\\CertificateChainValidator' => $vendorDir . '/web-auth/metadata-service/src/CertificateChain/CertificateChainValidator.php', - 'Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox' => $vendorDir . '/web-auth/metadata-service/src/CertificateChain/CertificateToolbox.php', - 'Webauthn\\MetadataService\\CertificateChain\\PhpCertificateChainValidator' => $vendorDir . '/web-auth/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php', - 'Webauthn\\MetadataService\\Denormalizer\\ExtensionDescriptorDenormalizer' => $vendorDir . '/web-auth/metadata-service/src/Denormalizer/ExtensionDescriptorDenormalizer.php', - 'Webauthn\\MetadataService\\Denormalizer\\MetadataStatementSerializerFactory' => $vendorDir . '/web-auth/metadata-service/src/Denormalizer/MetadataStatementSerializerFactory.php', - 'Webauthn\\MetadataService\\Event\\BeforeCertificateChainValidation' => $vendorDir . '/web-auth/metadata-service/src/Event/BeforeCertificateChainValidation.php', - 'Webauthn\\MetadataService\\Event\\CanDispatchEvents' => $vendorDir . '/web-auth/metadata-service/src/Event/CanDispatchEvents.php', - 'Webauthn\\MetadataService\\Event\\CertificateChainValidationFailed' => $vendorDir . '/web-auth/metadata-service/src/Event/CertificateChainValidationFailed.php', - 'Webauthn\\MetadataService\\Event\\CertificateChainValidationSucceeded' => $vendorDir . '/web-auth/metadata-service/src/Event/CertificateChainValidationSucceeded.php', - 'Webauthn\\MetadataService\\Event\\MetadataStatementFound' => $vendorDir . '/web-auth/metadata-service/src/Event/MetadataStatementFound.php', - 'Webauthn\\MetadataService\\Event\\NullEventDispatcher' => $vendorDir . '/web-auth/metadata-service/src/Event/NullEventDispatcher.php', - 'Webauthn\\MetadataService\\Event\\WebauthnEvent' => $vendorDir . '/web-auth/metadata-service/src/Event/WebauthnEvent.php', - 'Webauthn\\MetadataService\\Exception\\CertificateChainException' => $vendorDir . '/web-auth/metadata-service/src/Exception/CertificateChainException.php', - 'Webauthn\\MetadataService\\Exception\\CertificateException' => $vendorDir . '/web-auth/metadata-service/src/Exception/CertificateException.php', - 'Webauthn\\MetadataService\\Exception\\CertificateRevocationListException' => $vendorDir . '/web-auth/metadata-service/src/Exception/CertificateRevocationListException.php', - 'Webauthn\\MetadataService\\Exception\\ExpiredCertificateException' => $vendorDir . '/web-auth/metadata-service/src/Exception/ExpiredCertificateException.php', - 'Webauthn\\MetadataService\\Exception\\InvalidCertificateException' => $vendorDir . '/web-auth/metadata-service/src/Exception/InvalidCertificateException.php', - 'Webauthn\\MetadataService\\Exception\\MetadataServiceException' => $vendorDir . '/web-auth/metadata-service/src/Exception/MetadataServiceException.php', - 'Webauthn\\MetadataService\\Exception\\MetadataStatementException' => $vendorDir . '/web-auth/metadata-service/src/Exception/MetadataStatementException.php', - 'Webauthn\\MetadataService\\Exception\\MetadataStatementLoadingException' => $vendorDir . '/web-auth/metadata-service/src/Exception/MetadataStatementLoadingException.php', - 'Webauthn\\MetadataService\\Exception\\MissingMetadataStatementException' => $vendorDir . '/web-auth/metadata-service/src/Exception/MissingMetadataStatementException.php', - 'Webauthn\\MetadataService\\Exception\\RevokedCertificateException' => $vendorDir . '/web-auth/metadata-service/src/Exception/RevokedCertificateException.php', - 'Webauthn\\MetadataService\\MetadataStatementRepository' => $vendorDir . '/web-auth/metadata-service/src/MetadataStatementRepository.php', - 'Webauthn\\MetadataService\\Psr18HttpClient' => $vendorDir . '/web-auth/metadata-service/src/Psr18HttpClient.php', - 'Webauthn\\MetadataService\\Service\\ChainedMetadataServices' => $vendorDir . '/web-auth/metadata-service/src/Service/ChainedMetadataServices.php', - 'Webauthn\\MetadataService\\Service\\DistantResourceMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/DistantResourceMetadataService.php', - 'Webauthn\\MetadataService\\Service\\FidoAllianceCompliantMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/FidoAllianceCompliantMetadataService.php', - 'Webauthn\\MetadataService\\Service\\FolderResourceMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/FolderResourceMetadataService.php', - 'Webauthn\\MetadataService\\Service\\InMemoryMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/InMemoryMetadataService.php', - 'Webauthn\\MetadataService\\Service\\JsonMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/JsonMetadataService.php', - 'Webauthn\\MetadataService\\Service\\LocalResourceMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/LocalResourceMetadataService.php', - 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayload' => $vendorDir . '/web-auth/metadata-service/src/Service/MetadataBLOBPayload.php', - 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayloadEntry' => $vendorDir . '/web-auth/metadata-service/src/Service/MetadataBLOBPayloadEntry.php', - 'Webauthn\\MetadataService\\Service\\MetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/MetadataService.php', - 'Webauthn\\MetadataService\\Service\\StringMetadataService' => $vendorDir . '/web-auth/metadata-service/src/Service/StringMetadataService.php', - 'Webauthn\\MetadataService\\Statement\\AbstractDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/AbstractDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\AlternativeDescriptions' => $vendorDir . '/web-auth/metadata-service/src/Statement/AlternativeDescriptions.php', - 'Webauthn\\MetadataService\\Statement\\AuthenticatorGetInfo' => $vendorDir . '/web-auth/metadata-service/src/Statement/AuthenticatorGetInfo.php', - 'Webauthn\\MetadataService\\Statement\\AuthenticatorStatus' => $vendorDir . '/web-auth/metadata-service/src/Statement/AuthenticatorStatus.php', - 'Webauthn\\MetadataService\\Statement\\BiometricAccuracyDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/BiometricAccuracyDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\BiometricStatusReport' => $vendorDir . '/web-auth/metadata-service/src/Statement/BiometricStatusReport.php', - 'Webauthn\\MetadataService\\Statement\\CodeAccuracyDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/CodeAccuracyDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\DisplayPNGCharacteristicsDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/DisplayPNGCharacteristicsDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\EcdaaTrustAnchor' => $vendorDir . '/web-auth/metadata-service/src/Statement/EcdaaTrustAnchor.php', - 'Webauthn\\MetadataService\\Statement\\ExtensionDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/ExtensionDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\MetadataStatement' => $vendorDir . '/web-auth/metadata-service/src/Statement/MetadataStatement.php', - 'Webauthn\\MetadataService\\Statement\\PatternAccuracyDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/PatternAccuracyDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\RgbPaletteEntry' => $vendorDir . '/web-auth/metadata-service/src/Statement/RgbPaletteEntry.php', - 'Webauthn\\MetadataService\\Statement\\RogueListEntry' => $vendorDir . '/web-auth/metadata-service/src/Statement/RogueListEntry.php', - 'Webauthn\\MetadataService\\Statement\\StatusReport' => $vendorDir . '/web-auth/metadata-service/src/Statement/StatusReport.php', - 'Webauthn\\MetadataService\\Statement\\VerificationMethodANDCombinations' => $vendorDir . '/web-auth/metadata-service/src/Statement/VerificationMethodANDCombinations.php', - 'Webauthn\\MetadataService\\Statement\\VerificationMethodDescriptor' => $vendorDir . '/web-auth/metadata-service/src/Statement/VerificationMethodDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\Version' => $vendorDir . '/web-auth/metadata-service/src/Statement/Version.php', - 'Webauthn\\MetadataService\\StatusReportRepository' => $vendorDir . '/web-auth/metadata-service/src/StatusReportRepository.php', - 'Webauthn\\MetadataService\\ValueFilter' => $vendorDir . '/web-auth/metadata-service/src/ValueFilter.php', + 'Webauthn\\FakeCredentialGenerator' => $vendorDir . '/web-auth/webauthn-lib/src/FakeCredentialGenerator.php', + 'Webauthn\\MetadataService\\CanLogData' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/CanLogData.php', + 'Webauthn\\MetadataService\\CertificateChain\\CertificateChainValidator' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/CertificateChain/CertificateChainValidator.php', + 'Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/CertificateChain/CertificateToolbox.php', + 'Webauthn\\MetadataService\\CertificateChain\\PhpCertificateChainValidator' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/CertificateChain/PhpCertificateChainValidator.php', + 'Webauthn\\MetadataService\\Denormalizer\\ExtensionDescriptorDenormalizer' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Denormalizer/ExtensionDescriptorDenormalizer.php', + 'Webauthn\\MetadataService\\Denormalizer\\MetadataStatementSerializerFactory' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Denormalizer/MetadataStatementSerializerFactory.php', + 'Webauthn\\MetadataService\\Event\\BeforeCertificateChainValidation' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/BeforeCertificateChainValidation.php', + 'Webauthn\\MetadataService\\Event\\CanDispatchEvents' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/CanDispatchEvents.php', + 'Webauthn\\MetadataService\\Event\\CertificateChainValidationFailed' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/CertificateChainValidationFailed.php', + 'Webauthn\\MetadataService\\Event\\CertificateChainValidationSucceeded' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/CertificateChainValidationSucceeded.php', + 'Webauthn\\MetadataService\\Event\\MetadataStatementFound' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/MetadataStatementFound.php', + 'Webauthn\\MetadataService\\Event\\NullEventDispatcher' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/NullEventDispatcher.php', + 'Webauthn\\MetadataService\\Event\\WebauthnEvent' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Event/WebauthnEvent.php', + 'Webauthn\\MetadataService\\Exception\\CertificateChainException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/CertificateChainException.php', + 'Webauthn\\MetadataService\\Exception\\CertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/CertificateException.php', + 'Webauthn\\MetadataService\\Exception\\CertificateRevocationListException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/CertificateRevocationListException.php', + 'Webauthn\\MetadataService\\Exception\\ExpiredCertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/ExpiredCertificateException.php', + 'Webauthn\\MetadataService\\Exception\\InvalidCertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/InvalidCertificateException.php', + 'Webauthn\\MetadataService\\Exception\\MetadataServiceException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/MetadataServiceException.php', + 'Webauthn\\MetadataService\\Exception\\MetadataStatementException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/MetadataStatementException.php', + 'Webauthn\\MetadataService\\Exception\\MetadataStatementLoadingException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/MetadataStatementLoadingException.php', + 'Webauthn\\MetadataService\\Exception\\MissingMetadataStatementException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/MissingMetadataStatementException.php', + 'Webauthn\\MetadataService\\Exception\\RevokedCertificateException' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Exception/RevokedCertificateException.php', + 'Webauthn\\MetadataService\\MetadataStatementRepository' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/MetadataStatementRepository.php', + 'Webauthn\\MetadataService\\Psr18HttpClient' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Psr18HttpClient.php', + 'Webauthn\\MetadataService\\Service\\ChainedMetadataServices' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/ChainedMetadataServices.php', + 'Webauthn\\MetadataService\\Service\\DistantResourceMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/DistantResourceMetadataService.php', + 'Webauthn\\MetadataService\\Service\\FidoAllianceCompliantMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php', + 'Webauthn\\MetadataService\\Service\\FolderResourceMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/FolderResourceMetadataService.php', + 'Webauthn\\MetadataService\\Service\\InMemoryMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/InMemoryMetadataService.php', + 'Webauthn\\MetadataService\\Service\\JsonMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/JsonMetadataService.php', + 'Webauthn\\MetadataService\\Service\\LocalResourceMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/LocalResourceMetadataService.php', + 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayload' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayload.php', + 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayloadEntry' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayloadEntry.php', + 'Webauthn\\MetadataService\\Service\\MetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/MetadataService.php', + 'Webauthn\\MetadataService\\Service\\StringMetadataService' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Service/StringMetadataService.php', + 'Webauthn\\MetadataService\\Statement\\AbstractDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/AbstractDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\AlternativeDescriptions' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/AlternativeDescriptions.php', + 'Webauthn\\MetadataService\\Statement\\AuthenticatorGetInfo' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorGetInfo.php', + 'Webauthn\\MetadataService\\Statement\\AuthenticatorStatus' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorStatus.php', + 'Webauthn\\MetadataService\\Statement\\BiometricAccuracyDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricAccuracyDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\BiometricStatusReport' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricStatusReport.php', + 'Webauthn\\MetadataService\\Statement\\CodeAccuracyDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/CodeAccuracyDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\DisplayPNGCharacteristicsDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\EcdaaTrustAnchor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/EcdaaTrustAnchor.php', + 'Webauthn\\MetadataService\\Statement\\ExtensionDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/ExtensionDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\MetadataStatement' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/MetadataStatement.php', + 'Webauthn\\MetadataService\\Statement\\PatternAccuracyDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/PatternAccuracyDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\RgbPaletteEntry' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/RgbPaletteEntry.php', + 'Webauthn\\MetadataService\\Statement\\RogueListEntry' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/RogueListEntry.php', + 'Webauthn\\MetadataService\\Statement\\StatusReport' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/StatusReport.php', + 'Webauthn\\MetadataService\\Statement\\VerificationMethodANDCombinations' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodANDCombinations.php', + 'Webauthn\\MetadataService\\Statement\\VerificationMethodDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\Version' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/Statement/Version.php', + 'Webauthn\\MetadataService\\StatusReportRepository' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/StatusReportRepository.php', + 'Webauthn\\MetadataService\\ValueFilter' => $vendorDir . '/web-auth/webauthn-lib/src/MetadataService/ValueFilter.php', 'Webauthn\\PublicKeyCredential' => $vendorDir . '/web-auth/webauthn-lib/src/PublicKeyCredential.php', 'Webauthn\\PublicKeyCredentialCreationOptions' => $vendorDir . '/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php', 'Webauthn\\PublicKeyCredentialDescriptor' => $vendorDir . '/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptor.php', @@ -3746,6 +3769,7 @@ 'Webauthn\\PublicKeyCredentialSource' => $vendorDir . '/web-auth/webauthn-lib/src/PublicKeyCredentialSource.php', 'Webauthn\\PublicKeyCredentialSourceRepository' => $vendorDir . '/web-auth/webauthn-lib/src/PublicKeyCredentialSourceRepository.php', 'Webauthn\\PublicKeyCredentialUserEntity' => $vendorDir . '/web-auth/webauthn-lib/src/PublicKeyCredentialUserEntity.php', + 'Webauthn\\SimpleFakeCredentialGenerator' => $vendorDir . '/web-auth/webauthn-lib/src/SimpleFakeCredentialGenerator.php', 'Webauthn\\StringStream' => $vendorDir . '/web-auth/webauthn-lib/src/StringStream.php', 'Webauthn\\TokenBinding\\IgnoreTokenBindingHandler' => $vendorDir . '/web-auth/webauthn-lib/src/TokenBinding/IgnoreTokenBindingHandler.php', 'Webauthn\\TokenBinding\\SecTokenBindingHandler' => $vendorDir . '/web-auth/webauthn-lib/src/TokenBinding/SecTokenBindingHandler.php', diff --git a/composer/autoload_psr4.php b/composer/autoload_psr4.php index a9e39f853..bd1edfe07 100644 --- a/composer/autoload_psr4.php +++ b/composer/autoload_psr4.php @@ -14,7 +14,6 @@ 'cweagans\\Composer\\' => array($vendorDir . '/cweagans/composer-patches/src'), 'bantu\\IniGetWrapper\\' => array($vendorDir . '/bantu/ini-get-wrapper/src'), 'ZipStreamer\\' => array($vendorDir . '/deepdiver/zipstreamer/src'), - 'Webauthn\\MetadataService\\' => array($vendorDir . '/web-auth/metadata-service/src'), 'Webauthn\\' => array($vendorDir . '/web-auth/webauthn-lib/src'), 'Symfony\\Polyfill\\Uuid\\' => array($vendorDir . '/symfony/polyfill-uuid'), 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), diff --git a/composer/autoload_static.php b/composer/autoload_static.php index 914532b1a..252fe8009 100644 --- a/composer/autoload_static.php +++ b/composer/autoload_static.php @@ -68,7 +68,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 ), 'W' => array ( - 'Webauthn\\MetadataService\\' => 25, 'Webauthn\\' => 9, ), 'S' => @@ -226,10 +225,6 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 array ( 0 => __DIR__ . '/..' . '/deepdiver/zipstreamer/src', ), - 'Webauthn\\MetadataService\\' => - array ( - 0 => __DIR__ . '/..' . '/web-auth/metadata-service/src', - ), 'Webauthn\\' => array ( 0 => __DIR__ . '/..' . '/web-auth/webauthn-lib/src', @@ -4190,18 +4185,23 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Webauthn\\Credential' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Credential.php', 'Webauthn\\Denormalizer\\AttestationObjectDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AttestationObjectDenormalizer.php', 'Webauthn\\Denormalizer\\AttestationStatementDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AttestationStatementDenormalizer.php', + 'Webauthn\\Denormalizer\\AttestedCredentialDataNormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AttestedCredentialDataNormalizer.php', + 'Webauthn\\Denormalizer\\AuthenticationExtensionNormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionNormalizer.php', 'Webauthn\\Denormalizer\\AuthenticationExtensionsDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionsDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorAssertionResponseDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorAttestationResponseDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAttestationResponseDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorDataDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorDataDenormalizer.php', 'Webauthn\\Denormalizer\\AuthenticatorResponseDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorResponseDenormalizer.php', 'Webauthn\\Denormalizer\\CollectedClientDataDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/CollectedClientDataDenormalizer.php', + 'Webauthn\\Denormalizer\\ExtensionDescriptorDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/ExtensionDescriptorDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDenormalizer.php', + 'Webauthn\\Denormalizer\\PublicKeyCredentialDescriptorNormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDescriptorNormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialOptionsDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialParametersDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialParametersDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialSourceDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php', 'Webauthn\\Denormalizer\\PublicKeyCredentialUserEntityDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php', 'Webauthn\\Denormalizer\\TrustPathDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/TrustPathDenormalizer.php', + 'Webauthn\\Denormalizer\\VerificationMethodANDCombinationsDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/VerificationMethodANDCombinationsDenormalizer.php', 'Webauthn\\Denormalizer\\WebauthnSerializerFactory' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Denormalizer/WebauthnSerializerFactory.php', 'Webauthn\\Event\\AttestationObjectLoaded' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/AttestationObjectLoaded.php', 'Webauthn\\Event\\AttestationStatementLoaded' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/AttestationStatementLoaded.php', @@ -4209,74 +4209,92 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Webauthn\\Event\\AuthenticatorAssertionResponseValidationSucceededEvent' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/AuthenticatorAssertionResponseValidationSucceededEvent.php', 'Webauthn\\Event\\AuthenticatorAttestationResponseValidationFailedEvent' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/AuthenticatorAttestationResponseValidationFailedEvent.php', 'Webauthn\\Event\\AuthenticatorAttestationResponseValidationSucceededEvent' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/AuthenticatorAttestationResponseValidationSucceededEvent.php', + 'Webauthn\\Event\\BeforeCertificateChainValidation' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/BeforeCertificateChainValidation.php', + 'Webauthn\\Event\\CanDispatchEvents' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/CanDispatchEvents.php', + 'Webauthn\\Event\\CertificateChainValidationFailed' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/CertificateChainValidationFailed.php', + 'Webauthn\\Event\\CertificateChainValidationSucceeded' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/CertificateChainValidationSucceeded.php', + 'Webauthn\\Event\\MetadataStatementFound' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/MetadataStatementFound.php', + 'Webauthn\\Event\\NullEventDispatcher' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/NullEventDispatcher.php', + 'Webauthn\\Event\\WebauthnEvent' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Event/WebauthnEvent.php', 'Webauthn\\Exception\\AttestationStatementException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/AttestationStatementException.php', 'Webauthn\\Exception\\AttestationStatementLoadingException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/AttestationStatementLoadingException.php', 'Webauthn\\Exception\\AttestationStatementVerificationException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/AttestationStatementVerificationException.php', 'Webauthn\\Exception\\AuthenticationExtensionException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/AuthenticationExtensionException.php', 'Webauthn\\Exception\\AuthenticatorResponseVerificationException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/AuthenticatorResponseVerificationException.php', + 'Webauthn\\Exception\\CertificateChainException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/CertificateChainException.php', + 'Webauthn\\Exception\\CertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/CertificateException.php', + 'Webauthn\\Exception\\CertificateRevocationListException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/CertificateRevocationListException.php', 'Webauthn\\Exception\\CounterException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/CounterException.php', + 'Webauthn\\Exception\\ExpiredCertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/ExpiredCertificateException.php', 'Webauthn\\Exception\\InvalidAttestationStatementException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/InvalidAttestationStatementException.php', + 'Webauthn\\Exception\\InvalidCertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/InvalidCertificateException.php', 'Webauthn\\Exception\\InvalidDataException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/InvalidDataException.php', 'Webauthn\\Exception\\InvalidTrustPathException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/InvalidTrustPathException.php', 'Webauthn\\Exception\\InvalidUserHandleException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/InvalidUserHandleException.php', + 'Webauthn\\Exception\\MetadataServiceException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/MetadataServiceException.php', + 'Webauthn\\Exception\\MetadataStatementException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/MetadataStatementException.php', + 'Webauthn\\Exception\\MetadataStatementLoadingException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/MetadataStatementLoadingException.php', + 'Webauthn\\Exception\\MissingMetadataStatementException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/MissingMetadataStatementException.php', + 'Webauthn\\Exception\\RevokedCertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/RevokedCertificateException.php', 'Webauthn\\Exception\\UnsupportedFeatureException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/UnsupportedFeatureException.php', 'Webauthn\\Exception\\WebauthnException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/Exception/WebauthnException.php', - 'Webauthn\\MetadataService\\CanLogData' => __DIR__ . '/..' . '/web-auth/metadata-service/src/CanLogData.php', - 'Webauthn\\MetadataService\\CertificateChain\\CertificateChainValidator' => __DIR__ . '/..' . '/web-auth/metadata-service/src/CertificateChain/CertificateChainValidator.php', - 'Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox' => __DIR__ . '/..' . '/web-auth/metadata-service/src/CertificateChain/CertificateToolbox.php', - 'Webauthn\\MetadataService\\CertificateChain\\PhpCertificateChainValidator' => __DIR__ . '/..' . '/web-auth/metadata-service/src/CertificateChain/PhpCertificateChainValidator.php', - 'Webauthn\\MetadataService\\Denormalizer\\ExtensionDescriptorDenormalizer' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Denormalizer/ExtensionDescriptorDenormalizer.php', - 'Webauthn\\MetadataService\\Denormalizer\\MetadataStatementSerializerFactory' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Denormalizer/MetadataStatementSerializerFactory.php', - 'Webauthn\\MetadataService\\Event\\BeforeCertificateChainValidation' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/BeforeCertificateChainValidation.php', - 'Webauthn\\MetadataService\\Event\\CanDispatchEvents' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/CanDispatchEvents.php', - 'Webauthn\\MetadataService\\Event\\CertificateChainValidationFailed' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/CertificateChainValidationFailed.php', - 'Webauthn\\MetadataService\\Event\\CertificateChainValidationSucceeded' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/CertificateChainValidationSucceeded.php', - 'Webauthn\\MetadataService\\Event\\MetadataStatementFound' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/MetadataStatementFound.php', - 'Webauthn\\MetadataService\\Event\\NullEventDispatcher' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/NullEventDispatcher.php', - 'Webauthn\\MetadataService\\Event\\WebauthnEvent' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Event/WebauthnEvent.php', - 'Webauthn\\MetadataService\\Exception\\CertificateChainException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/CertificateChainException.php', - 'Webauthn\\MetadataService\\Exception\\CertificateException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/CertificateException.php', - 'Webauthn\\MetadataService\\Exception\\CertificateRevocationListException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/CertificateRevocationListException.php', - 'Webauthn\\MetadataService\\Exception\\ExpiredCertificateException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/ExpiredCertificateException.php', - 'Webauthn\\MetadataService\\Exception\\InvalidCertificateException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/InvalidCertificateException.php', - 'Webauthn\\MetadataService\\Exception\\MetadataServiceException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/MetadataServiceException.php', - 'Webauthn\\MetadataService\\Exception\\MetadataStatementException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/MetadataStatementException.php', - 'Webauthn\\MetadataService\\Exception\\MetadataStatementLoadingException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/MetadataStatementLoadingException.php', - 'Webauthn\\MetadataService\\Exception\\MissingMetadataStatementException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/MissingMetadataStatementException.php', - 'Webauthn\\MetadataService\\Exception\\RevokedCertificateException' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Exception/RevokedCertificateException.php', - 'Webauthn\\MetadataService\\MetadataStatementRepository' => __DIR__ . '/..' . '/web-auth/metadata-service/src/MetadataStatementRepository.php', - 'Webauthn\\MetadataService\\Psr18HttpClient' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Psr18HttpClient.php', - 'Webauthn\\MetadataService\\Service\\ChainedMetadataServices' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/ChainedMetadataServices.php', - 'Webauthn\\MetadataService\\Service\\DistantResourceMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/DistantResourceMetadataService.php', - 'Webauthn\\MetadataService\\Service\\FidoAllianceCompliantMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/FidoAllianceCompliantMetadataService.php', - 'Webauthn\\MetadataService\\Service\\FolderResourceMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/FolderResourceMetadataService.php', - 'Webauthn\\MetadataService\\Service\\InMemoryMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/InMemoryMetadataService.php', - 'Webauthn\\MetadataService\\Service\\JsonMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/JsonMetadataService.php', - 'Webauthn\\MetadataService\\Service\\LocalResourceMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/LocalResourceMetadataService.php', - 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayload' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/MetadataBLOBPayload.php', - 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayloadEntry' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/MetadataBLOBPayloadEntry.php', - 'Webauthn\\MetadataService\\Service\\MetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/MetadataService.php', - 'Webauthn\\MetadataService\\Service\\StringMetadataService' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Service/StringMetadataService.php', - 'Webauthn\\MetadataService\\Statement\\AbstractDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/AbstractDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\AlternativeDescriptions' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/AlternativeDescriptions.php', - 'Webauthn\\MetadataService\\Statement\\AuthenticatorGetInfo' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/AuthenticatorGetInfo.php', - 'Webauthn\\MetadataService\\Statement\\AuthenticatorStatus' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/AuthenticatorStatus.php', - 'Webauthn\\MetadataService\\Statement\\BiometricAccuracyDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/BiometricAccuracyDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\BiometricStatusReport' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/BiometricStatusReport.php', - 'Webauthn\\MetadataService\\Statement\\CodeAccuracyDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/CodeAccuracyDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\DisplayPNGCharacteristicsDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/DisplayPNGCharacteristicsDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\EcdaaTrustAnchor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/EcdaaTrustAnchor.php', - 'Webauthn\\MetadataService\\Statement\\ExtensionDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/ExtensionDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\MetadataStatement' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/MetadataStatement.php', - 'Webauthn\\MetadataService\\Statement\\PatternAccuracyDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/PatternAccuracyDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\RgbPaletteEntry' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/RgbPaletteEntry.php', - 'Webauthn\\MetadataService\\Statement\\RogueListEntry' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/RogueListEntry.php', - 'Webauthn\\MetadataService\\Statement\\StatusReport' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/StatusReport.php', - 'Webauthn\\MetadataService\\Statement\\VerificationMethodANDCombinations' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/VerificationMethodANDCombinations.php', - 'Webauthn\\MetadataService\\Statement\\VerificationMethodDescriptor' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/VerificationMethodDescriptor.php', - 'Webauthn\\MetadataService\\Statement\\Version' => __DIR__ . '/..' . '/web-auth/metadata-service/src/Statement/Version.php', - 'Webauthn\\MetadataService\\StatusReportRepository' => __DIR__ . '/..' . '/web-auth/metadata-service/src/StatusReportRepository.php', - 'Webauthn\\MetadataService\\ValueFilter' => __DIR__ . '/..' . '/web-auth/metadata-service/src/ValueFilter.php', + 'Webauthn\\FakeCredentialGenerator' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/FakeCredentialGenerator.php', + 'Webauthn\\MetadataService\\CanLogData' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/CanLogData.php', + 'Webauthn\\MetadataService\\CertificateChain\\CertificateChainValidator' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/CertificateChain/CertificateChainValidator.php', + 'Webauthn\\MetadataService\\CertificateChain\\CertificateToolbox' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/CertificateChain/CertificateToolbox.php', + 'Webauthn\\MetadataService\\CertificateChain\\PhpCertificateChainValidator' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/CertificateChain/PhpCertificateChainValidator.php', + 'Webauthn\\MetadataService\\Denormalizer\\ExtensionDescriptorDenormalizer' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Denormalizer/ExtensionDescriptorDenormalizer.php', + 'Webauthn\\MetadataService\\Denormalizer\\MetadataStatementSerializerFactory' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Denormalizer/MetadataStatementSerializerFactory.php', + 'Webauthn\\MetadataService\\Event\\BeforeCertificateChainValidation' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/BeforeCertificateChainValidation.php', + 'Webauthn\\MetadataService\\Event\\CanDispatchEvents' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/CanDispatchEvents.php', + 'Webauthn\\MetadataService\\Event\\CertificateChainValidationFailed' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/CertificateChainValidationFailed.php', + 'Webauthn\\MetadataService\\Event\\CertificateChainValidationSucceeded' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/CertificateChainValidationSucceeded.php', + 'Webauthn\\MetadataService\\Event\\MetadataStatementFound' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/MetadataStatementFound.php', + 'Webauthn\\MetadataService\\Event\\NullEventDispatcher' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/NullEventDispatcher.php', + 'Webauthn\\MetadataService\\Event\\WebauthnEvent' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Event/WebauthnEvent.php', + 'Webauthn\\MetadataService\\Exception\\CertificateChainException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/CertificateChainException.php', + 'Webauthn\\MetadataService\\Exception\\CertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/CertificateException.php', + 'Webauthn\\MetadataService\\Exception\\CertificateRevocationListException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/CertificateRevocationListException.php', + 'Webauthn\\MetadataService\\Exception\\ExpiredCertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/ExpiredCertificateException.php', + 'Webauthn\\MetadataService\\Exception\\InvalidCertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/InvalidCertificateException.php', + 'Webauthn\\MetadataService\\Exception\\MetadataServiceException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/MetadataServiceException.php', + 'Webauthn\\MetadataService\\Exception\\MetadataStatementException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/MetadataStatementException.php', + 'Webauthn\\MetadataService\\Exception\\MetadataStatementLoadingException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/MetadataStatementLoadingException.php', + 'Webauthn\\MetadataService\\Exception\\MissingMetadataStatementException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/MissingMetadataStatementException.php', + 'Webauthn\\MetadataService\\Exception\\RevokedCertificateException' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Exception/RevokedCertificateException.php', + 'Webauthn\\MetadataService\\MetadataStatementRepository' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/MetadataStatementRepository.php', + 'Webauthn\\MetadataService\\Psr18HttpClient' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Psr18HttpClient.php', + 'Webauthn\\MetadataService\\Service\\ChainedMetadataServices' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/ChainedMetadataServices.php', + 'Webauthn\\MetadataService\\Service\\DistantResourceMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/DistantResourceMetadataService.php', + 'Webauthn\\MetadataService\\Service\\FidoAllianceCompliantMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php', + 'Webauthn\\MetadataService\\Service\\FolderResourceMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/FolderResourceMetadataService.php', + 'Webauthn\\MetadataService\\Service\\InMemoryMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/InMemoryMetadataService.php', + 'Webauthn\\MetadataService\\Service\\JsonMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/JsonMetadataService.php', + 'Webauthn\\MetadataService\\Service\\LocalResourceMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/LocalResourceMetadataService.php', + 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayload' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayload.php', + 'Webauthn\\MetadataService\\Service\\MetadataBLOBPayloadEntry' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayloadEntry.php', + 'Webauthn\\MetadataService\\Service\\MetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/MetadataService.php', + 'Webauthn\\MetadataService\\Service\\StringMetadataService' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Service/StringMetadataService.php', + 'Webauthn\\MetadataService\\Statement\\AbstractDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/AbstractDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\AlternativeDescriptions' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/AlternativeDescriptions.php', + 'Webauthn\\MetadataService\\Statement\\AuthenticatorGetInfo' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorGetInfo.php', + 'Webauthn\\MetadataService\\Statement\\AuthenticatorStatus' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorStatus.php', + 'Webauthn\\MetadataService\\Statement\\BiometricAccuracyDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricAccuracyDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\BiometricStatusReport' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricStatusReport.php', + 'Webauthn\\MetadataService\\Statement\\CodeAccuracyDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/CodeAccuracyDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\DisplayPNGCharacteristicsDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\EcdaaTrustAnchor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/EcdaaTrustAnchor.php', + 'Webauthn\\MetadataService\\Statement\\ExtensionDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/ExtensionDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\MetadataStatement' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/MetadataStatement.php', + 'Webauthn\\MetadataService\\Statement\\PatternAccuracyDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/PatternAccuracyDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\RgbPaletteEntry' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/RgbPaletteEntry.php', + 'Webauthn\\MetadataService\\Statement\\RogueListEntry' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/RogueListEntry.php', + 'Webauthn\\MetadataService\\Statement\\StatusReport' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/StatusReport.php', + 'Webauthn\\MetadataService\\Statement\\VerificationMethodANDCombinations' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodANDCombinations.php', + 'Webauthn\\MetadataService\\Statement\\VerificationMethodDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodDescriptor.php', + 'Webauthn\\MetadataService\\Statement\\Version' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/Statement/Version.php', + 'Webauthn\\MetadataService\\StatusReportRepository' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/StatusReportRepository.php', + 'Webauthn\\MetadataService\\ValueFilter' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/MetadataService/ValueFilter.php', 'Webauthn\\PublicKeyCredential' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/PublicKeyCredential.php', 'Webauthn\\PublicKeyCredentialCreationOptions' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php', 'Webauthn\\PublicKeyCredentialDescriptor' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptor.php', @@ -4290,6 +4308,7 @@ class ComposerStaticInit2f23f73bc0cc116b4b1eee1521aa8652 'Webauthn\\PublicKeyCredentialSource' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/PublicKeyCredentialSource.php', 'Webauthn\\PublicKeyCredentialSourceRepository' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/PublicKeyCredentialSourceRepository.php', 'Webauthn\\PublicKeyCredentialUserEntity' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/PublicKeyCredentialUserEntity.php', + 'Webauthn\\SimpleFakeCredentialGenerator' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/SimpleFakeCredentialGenerator.php', 'Webauthn\\StringStream' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/StringStream.php', 'Webauthn\\TokenBinding\\IgnoreTokenBindingHandler' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/TokenBinding/IgnoreTokenBindingHandler.php', 'Webauthn\\TokenBinding\\SecTokenBindingHandler' => __DIR__ . '/..' . '/web-auth/webauthn-lib/src/TokenBinding/SecTokenBindingHandler.php', diff --git a/composer/installed.json b/composer/installed.json index 9ba0c1d2e..1d275c0a2 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -6625,133 +6625,50 @@ ], "install-path": "../web-auth/cose-lib" }, - { - "name": "web-auth/metadata-service", - "version": "4.8.5", - "version_normalized": "4.8.5.0", - "source": { - "type": "git", - "url": "https://github.com/web-auth/webauthn-metadata-service.git", - "reference": "fb7c1f107639285fab90f870aab38360252c82f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-metadata-service/zipball/fb7c1f107639285fab90f870aab38360252c82f5", - "reference": "fb7c1f107639285fab90f870aab38360252c82f5", - "shasum": "" - }, - "require": { - "ext-json": "*", - "lcobucci/clock": "^2.2|^3.0", - "paragonie/constant_time_encoding": "^2.6", - "php": ">=8.1", - "psr/clock": "^1.0", - "psr/event-dispatcher": "^1.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/log": "^1.0|^2.0|^3.0", - "spomky-labs/pki-framework": "^1.0", - "symfony/deprecation-contracts": "^3.2" - }, - "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", - "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" - }, - "time": "2024-03-13T07:16:02+00:00", - "type": "library", - "extra": { - "thanks": { - "name": "web-auth/webauthn-framework", - "url": "https://github.com/web-auth/webauthn-framework" - } - }, - "installation-source": "dist", - "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/4.8.5" - }, - "funding": [ - { - "url": "https://github.com/Spomky", - "type": "github" - }, - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "install-path": "../web-auth/metadata-service" - }, { "name": "web-auth/webauthn-lib", - "version": "4.8.5", - "version_normalized": "4.8.5.0", + "version": "4.9.1", + "version_normalized": "4.9.1.0", "source": { "type": "git", "url": "https://github.com/web-auth/webauthn-lib.git", - "reference": "925873eb504a1db8a77dc2b4d2b578334736fa16" + "reference": "fd7a0943c663b325e92ad562c2bcc943e77beeac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/925873eb504a1db8a77dc2b4d2b578334736fa16", - "reference": "925873eb504a1db8a77dc2b4d2b578334736fa16", + "url": "https://api.github.com/repos/web-auth/webauthn-lib/zipball/fd7a0943c663b325e92ad562c2bcc943e77beeac", + "reference": "fd7a0943c663b325e92ad562c2bcc943e77beeac", "shasum": "" }, "require": { "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "paragonie/constant_time_encoding": "^2.6", + "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/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", - "web-auth/metadata-service": "self.version" + "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", "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 the AndroidSafetyNet Attestation Statement support" + "web-token/jwt-library": "Mandatory for fetching Metadata Statement from distant sources" }, - "time": "2024-04-08T10:04:23+00:00", + "time": "2024-07-16T18:36:36+00:00", "type": "library", "extra": { "thanks": { @@ -6787,7 +6704,7 @@ "webauthn" ], "support": { - "source": "https://github.com/web-auth/webauthn-lib/tree/4.8.5" + "source": "https://github.com/web-auth/webauthn-lib/tree/4.9.1" }, "funding": [ { diff --git a/composer/installed.php b/composer/installed.php index 123b89dab..013043eba 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -907,19 +907,10 @@ 'aliases' => array(), 'dev_requirement' => false, ), - 'web-auth/metadata-service' => array( - 'pretty_version' => '4.8.5', - 'version' => '4.8.5.0', - 'reference' => 'fb7c1f107639285fab90f870aab38360252c82f5', - 'type' => 'library', - 'install_path' => __DIR__ . '/../web-auth/metadata-service', - 'aliases' => array(), - 'dev_requirement' => false, - ), 'web-auth/webauthn-lib' => array( - 'pretty_version' => '4.8.5', - 'version' => '4.8.5.0', - 'reference' => '925873eb504a1db8a77dc2b4d2b578334736fa16', + 'pretty_version' => '4.9.1', + 'version' => '4.9.1.0', + 'reference' => 'fd7a0943c663b325e92ad562c2bcc943e77beeac', 'type' => 'library', 'install_path' => __DIR__ . '/../web-auth/webauthn-lib', 'aliases' => array(), diff --git a/web-auth/metadata-service/LICENSE b/web-auth/metadata-service/LICENSE deleted file mode 100644 index 8cb7b7487..000000000 --- a/web-auth/metadata-service/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018-2022 Spomky-Labs - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/web-auth/metadata-service/src/Denormalizer/MetadataStatementSerializerFactory.php b/web-auth/metadata-service/src/Denormalizer/MetadataStatementSerializerFactory.php deleted file mode 100644 index e751c8bba..000000000 --- a/web-auth/metadata-service/src/Denormalizer/MetadataStatementSerializerFactory.php +++ /dev/null @@ -1,64 +0,0 @@ - $package) { - if (! class_exists($class)) { - return null; - } - } - - $denormalizers = [ - new ExtensionDescriptorDenormalizer(), - new UidNormalizer(), - new ArrayDenormalizer(), - new ObjectNormalizer( - propertyTypeExtractor: new PropertyInfoExtractor(typeExtractors: [ - new PhpDocExtractor(), - new ReflectionExtractor(), - ]) - ), - ]; - - return new Serializer($denormalizers, [new JsonEncoder()]); - } - - /** - * @return array - */ - private static function getRequiredSerializerClasses(): array - { - return [ - UidNormalizer::class => self::PACKAGE_SYMFONY_SERIALIZER, - ArrayDenormalizer::class => self::PACKAGE_SYMFONY_SERIALIZER, - ObjectNormalizer::class => self::PACKAGE_SYMFONY_SERIALIZER, - PropertyInfoExtractor::class => self::PACKAGE_SYMFONY_PROPERTY_INFO, - PhpDocExtractor::class => self::PACKAGE_PHPDOCUMENTOR_REFLECTION_DOCBLOCK, - ReflectionExtractor::class => self::PACKAGE_SYMFONY_PROPERTY_INFO, - JsonEncoder::class => self::PACKAGE_SYMFONY_SERIALIZER, - Serializer::class => self::PACKAGE_SYMFONY_SERIALIZER, - ]; - } -} diff --git a/web-auth/metadata-service/src/Exception/RevokedCertificateException.php b/web-auth/metadata-service/src/Exception/RevokedCertificateException.php deleted file mode 100644 index 4b710bfe8..000000000 --- a/web-auth/metadata-service/src/Exception/RevokedCertificateException.php +++ /dev/null @@ -1,9 +0,0 @@ - $this->fmt, 'attStmt' => $this->attStmt, diff --git a/web-auth/webauthn-lib/src/AttestationStatement/FidoU2FAttestationStatementSupport.php b/web-auth/webauthn-lib/src/AttestationStatement/FidoU2FAttestationStatementSupport.php index 6ca4037ff..db4bf3a12 100644 --- a/web-auth/webauthn-lib/src/AttestationStatement/FidoU2FAttestationStatementSupport.php +++ b/web-auth/webauthn-lib/src/AttestationStatement/FidoU2FAttestationStatementSupport.php @@ -11,12 +11,12 @@ use Throwable; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\NullEventDispatcher; use Webauthn\Exception\AttestationStatementLoadingException; use Webauthn\Exception\AttestationStatementVerificationException; use Webauthn\Exception\InvalidAttestationStatementException; use Webauthn\MetadataService\CertificateChain\CertificateToolbox; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\NullEventDispatcher; use Webauthn\StringStream; use Webauthn\TrustPath\CertificateTrustPath; use function array_key_exists; diff --git a/web-auth/webauthn-lib/src/AttestationStatement/NoneAttestationStatementSupport.php b/web-auth/webauthn-lib/src/AttestationStatement/NoneAttestationStatementSupport.php index fb7e6b2cf..a28e3e6cc 100644 --- a/web-auth/webauthn-lib/src/AttestationStatement/NoneAttestationStatementSupport.php +++ b/web-auth/webauthn-lib/src/AttestationStatement/NoneAttestationStatementSupport.php @@ -7,9 +7,9 @@ use Psr\EventDispatcher\EventDispatcherInterface; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\NullEventDispatcher; use Webauthn\Exception\AttestationStatementLoadingException; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\NullEventDispatcher; use Webauthn\TrustPath\EmptyTrustPath; use function count; use function is_array; diff --git a/web-auth/webauthn-lib/src/AttestationStatement/PackedAttestationStatementSupport.php b/web-auth/webauthn-lib/src/AttestationStatement/PackedAttestationStatementSupport.php index f242004fe..7af35f589 100644 --- a/web-auth/webauthn-lib/src/AttestationStatement/PackedAttestationStatementSupport.php +++ b/web-auth/webauthn-lib/src/AttestationStatement/PackedAttestationStatementSupport.php @@ -13,14 +13,14 @@ use Psr\EventDispatcher\EventDispatcherInterface; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\NullEventDispatcher; use Webauthn\Exception\AttestationStatementLoadingException; use Webauthn\Exception\AttestationStatementVerificationException; use Webauthn\Exception\InvalidAttestationStatementException; use Webauthn\Exception\InvalidDataException; use Webauthn\Exception\UnsupportedFeatureException; use Webauthn\MetadataService\CertificateChain\CertificateToolbox; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\NullEventDispatcher; use Webauthn\StringStream; use Webauthn\TrustPath\CertificateTrustPath; use Webauthn\TrustPath\EcdaaKeyIdTrustPath; diff --git a/web-auth/webauthn-lib/src/AttestationStatement/TPMAttestationStatementSupport.php b/web-auth/webauthn-lib/src/AttestationStatement/TPMAttestationStatementSupport.php index 8d31c45f2..71a60ca61 100644 --- a/web-auth/webauthn-lib/src/AttestationStatement/TPMAttestationStatementSupport.php +++ b/web-auth/webauthn-lib/src/AttestationStatement/TPMAttestationStatementSupport.php @@ -20,13 +20,13 @@ use Psr\EventDispatcher\EventDispatcherInterface; use Webauthn\AuthenticatorData; use Webauthn\Event\AttestationStatementLoaded; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\NullEventDispatcher; use Webauthn\Exception\AttestationStatementLoadingException; use Webauthn\Exception\AttestationStatementVerificationException; use Webauthn\Exception\InvalidAttestationStatementException; use Webauthn\Exception\UnsupportedFeatureException; use Webauthn\MetadataService\CertificateChain\CertificateToolbox; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\NullEventDispatcher; use Webauthn\StringStream; use Webauthn\TrustPath\CertificateTrustPath; use Webauthn\TrustPath\EcdaaKeyIdTrustPath; diff --git a/web-auth/webauthn-lib/src/AttestedCredentialData.php b/web-auth/webauthn-lib/src/AttestedCredentialData.php index a0d589d23..a97f3fa49 100644 --- a/web-auth/webauthn-lib/src/AttestedCredentialData.php +++ b/web-auth/webauthn-lib/src/AttestedCredentialData.php @@ -66,6 +66,7 @@ public function getCredentialPublicKey(): ?string /** * @param mixed[] $json + * @deprecated since 4.9.0 and will be removed in 5.0.0. Please use the serializer instead. */ public static function createFromArray(array $json): self { @@ -108,6 +109,12 @@ public static function createFromArray(array $json): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $result = [ 'aaguid' => $this->aaguid->__toString(), 'credentialId' => base64_encode($this->credentialId), diff --git a/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php b/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php index 3f9ff6a2b..384476a1e 100644 --- a/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php +++ b/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtension.php @@ -39,6 +39,12 @@ public function value(): mixed public function jsonSerialize(): mixed { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return $this->value; } } diff --git a/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtensions.php b/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtensions.php index bedabbb53..2ef2bc65e 100644 --- a/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtensions.php +++ b/web-auth/webauthn-lib/src/AuthenticationExtensions/AuthenticationExtensions.php @@ -109,6 +109,12 @@ public function get(string $key): AuthenticationExtension */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return $this->extensions; } diff --git a/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php b/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php index 9867c5ef9..fa433b211 100644 --- a/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php +++ b/web-auth/webauthn-lib/src/AuthenticatorAssertionResponseValidator.php @@ -16,10 +16,10 @@ use Webauthn\Counter\CounterChecker; use Webauthn\Event\AuthenticatorAssertionResponseValidationFailedEvent; use Webauthn\Event\AuthenticatorAssertionResponseValidationSucceededEvent; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\NullEventDispatcher; use Webauthn\Exception\AuthenticatorResponseVerificationException; use Webauthn\MetadataService\CanLogData; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\NullEventDispatcher; use Webauthn\TokenBinding\TokenBindingHandler; use function is_string; diff --git a/web-auth/webauthn-lib/src/AuthenticatorAttestationResponseValidator.php b/web-auth/webauthn-lib/src/AuthenticatorAttestationResponseValidator.php index 34310b5dd..97d43402e 100644 --- a/web-auth/webauthn-lib/src/AuthenticatorAttestationResponseValidator.php +++ b/web-auth/webauthn-lib/src/AuthenticatorAttestationResponseValidator.php @@ -15,11 +15,11 @@ use Webauthn\CeremonyStep\CeremonyStepManagerFactory; use Webauthn\Event\AuthenticatorAttestationResponseValidationFailedEvent; use Webauthn\Event\AuthenticatorAttestationResponseValidationSucceededEvent; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\NullEventDispatcher; use Webauthn\Exception\AuthenticatorResponseVerificationException; use Webauthn\MetadataService\CanLogData; use Webauthn\MetadataService\CertificateChain\CertificateChainValidator; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\NullEventDispatcher; use Webauthn\MetadataService\MetadataStatementRepository; use Webauthn\MetadataService\StatusReportRepository; use Webauthn\TokenBinding\TokenBindingHandler; diff --git a/web-auth/webauthn-lib/src/AuthenticatorSelectionCriteria.php b/web-auth/webauthn-lib/src/AuthenticatorSelectionCriteria.php index 0bbad86fd..ac794688c 100644 --- a/web-auth/webauthn-lib/src/AuthenticatorSelectionCriteria.php +++ b/web-auth/webauthn-lib/src/AuthenticatorSelectionCriteria.php @@ -229,6 +229,12 @@ public static function createFromArray(array $json): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $json = [ 'requireResidentKey' => $this->requireResidentKey, 'userVerification' => $this->userVerification, diff --git a/web-auth/webauthn-lib/src/Credential.php b/web-auth/webauthn-lib/src/Credential.php index cbad84cca..7b0e7b28b 100644 --- a/web-auth/webauthn-lib/src/Credential.php +++ b/web-auth/webauthn-lib/src/Credential.php @@ -4,15 +4,40 @@ namespace Webauthn; +use InvalidArgumentException; +use ParagonIE\ConstantTime\Base64UrlSafe; + /** * @see https://w3c.github.io/webappsec-credential-management/#credential */ abstract class Credential { + /** + * @deprecated since 4.9.0. Please use the property rawId instead. + */ + public readonly string $id; + + public readonly string $rawId; + public function __construct( - public readonly string $id, - public readonly string $type + null|string $id, + public readonly string $type, + null|string $rawId = null, ) { + if ($id === null && $rawId === null) { + throw new InvalidArgumentException('You must provide a valid raw ID'); + } + if ($id !== null) { + trigger_deprecation( + 'web-auth/webauthn-lib', + '4.9.0', + 'The property "$id" is deprecated and will be removed in 5.0.0. Please set null use "rawId" instead.' + ); + } else { + $id = Base64UrlSafe::encodeUnpadded($rawId); + } + $this->id = $id; + $this->rawId = $rawId ?? Base64UrlSafe::decodeNoPadding($id); } /** diff --git a/web-auth/webauthn-lib/src/Denormalizer/AttestedCredentialDataNormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/AttestedCredentialDataNormalizer.php new file mode 100644 index 000000000..05bd09100 --- /dev/null +++ b/web-auth/webauthn-lib/src/Denormalizer/AttestedCredentialDataNormalizer.php @@ -0,0 +1,45 @@ + + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof AttestedCredentialData); + $result = [ + 'aaguid' => $this->normalizer->normalize($data->aaguid, $format, $context), + 'credentialId' => base64_encode($data->credentialId), + ]; + if ($data->credentialPublicKey !== null) { + $result['credentialPublicKey'] = base64_encode($data->credentialPublicKey); + } + + return $result; + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof AttestedCredentialData; + } + + public function getSupportedTypes(?string $format): array + { + return [ + AttestedCredentialData::class => true, + ]; + } +} diff --git a/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionNormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionNormalizer.php new file mode 100644 index 000000000..b34d29dea --- /dev/null +++ b/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionNormalizer.php @@ -0,0 +1,37 @@ + + */ + public function getSupportedTypes(?string $format): array + { + return [ + AuthenticationExtension::class => true, + ]; + } + + /** + * @return array + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof AuthenticationExtension); + + return $data->value; + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof AuthenticationExtension; + } +} diff --git a/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionsDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionsDenormalizer.php index 861540ed6..e5bacefda 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionsDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/AuthenticationExtensionsDenormalizer.php @@ -4,9 +4,8 @@ namespace Webauthn\Denormalizer; -use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Webauthn\AuthenticationExtensions\AuthenticationExtension; use Webauthn\AuthenticationExtensions\AuthenticationExtensions; use Webauthn\AuthenticationExtensions\AuthenticationExtensionsClientInputs; @@ -16,10 +15,8 @@ use function is_array; use function is_string; -final class AuthenticationExtensionsDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface +final class AuthenticationExtensionsDenormalizer implements DenormalizerInterface, NormalizerInterface { - use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { if ($data instanceof AuthenticationExtensions) { @@ -60,4 +57,23 @@ public function getSupportedTypes(?string $format): array AuthenticationExtensionsClientOutputs::class => true, ]; } + + /** + * @return array + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof AuthenticationExtensions); + $extensions = []; + foreach ($data->extensions as $extension) { + $extensions[$extension->name] = $extension->value; + } + + return $extensions; + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof AuthenticationExtensions; + } } diff --git a/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php index 1f017ca21..613331c7a 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/AuthenticatorAssertionResponseDenormalizer.php @@ -25,14 +25,14 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $data['clientDataJSON'] = Base64UrlSafe::decodeNoPadding($data['clientDataJSON']); $userHandle = $data['userHandle'] ?? null; if ($userHandle !== '' && $userHandle !== null) { - $data['userHandle'] = Base64::decode($userHandle); + $userHandle = Base64::decode($userHandle); } return AuthenticatorAssertionResponse::create( $this->denormalizer->denormalize($data['clientDataJSON'], CollectedClientData::class, $format, $context), $this->denormalizer->denormalize($data['authenticatorData'], AuthenticatorData::class, $format, $context), $data['signature'], - $data['userHandle'] ?? null, + $userHandle ?? null, ! isset($data['attestationObject']) ? null : $this->denormalizer->denormalize( $data['attestationObject'], AttestationObject::class, diff --git a/web-auth/metadata-service/src/Denormalizer/ExtensionDescriptorDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/ExtensionDescriptorDenormalizer.php similarity index 78% rename from web-auth/metadata-service/src/Denormalizer/ExtensionDescriptorDenormalizer.php rename to web-auth/webauthn-lib/src/Denormalizer/ExtensionDescriptorDenormalizer.php index 52626c465..4109ffb44 100644 --- a/web-auth/metadata-service/src/Denormalizer/ExtensionDescriptorDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/ExtensionDescriptorDenormalizer.php @@ -2,16 +2,18 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Denormalizer; +namespace Webauthn\Denormalizer; -use Symfony\Component\Serializer\Exception\BadMethodCallException; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; use Webauthn\MetadataService\Statement\ExtensionDescriptor; use function array_key_exists; -final class ExtensionDescriptorDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface +/** + * @final + */ +class ExtensionDescriptorDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface { use DenormalizerAwareTrait; @@ -19,10 +21,6 @@ final class ExtensionDescriptorDenormalizer implements DenormalizerInterface, De public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { - if ($this->denormalizer === null) { - throw new BadMethodCallException('Please set a denormalizer before calling denormalize()!'); - } - if (array_key_exists('fail_if_unknown', $data)) { $data['failIfUnknown'] = $data['fail_if_unknown']; unset($data['fail_if_unknown']); diff --git a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDenormalizer.php index 74b230cb5..33899b707 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDenormalizer.php @@ -29,7 +29,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar $data['rawId'] = $rawId; return PublicKeyCredential::create( - $data['id'], + null, $data['type'], $data['rawId'], $this->denormalizer->denormalize($data['response'], AuthenticatorResponse::class, $format, $context), diff --git a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDescriptorNormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDescriptorNormalizer.php new file mode 100644 index 000000000..ec6a4b3d2 --- /dev/null +++ b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialDescriptorNormalizer.php @@ -0,0 +1,47 @@ + + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof PublicKeyCredentialDescriptor); + $result = [ + 'type' => $data->type, + 'id' => Base64UrlSafe::encodeUnpadded($data->id), + ]; + if (count($data->transports) !== 0) { + $result['transports'] = $data->transports; + } + + return $result; + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof PublicKeyCredentialDescriptor; + } + + public function getSupportedTypes(?string $format): array + { + return [ + PublicKeyCredentialDescriptor::class => true, + ]; + } +} diff --git a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php index 8a71479e8..1b59091d5 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialOptionsDenormalizer.php @@ -9,6 +9,9 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Webauthn\AuthenticationExtensions\AuthenticationExtensions; use Webauthn\AuthenticatorSelectionCriteria; use Webauthn\PublicKeyCredentialCreationOptions; @@ -18,11 +21,13 @@ use Webauthn\PublicKeyCredentialRpEntity; use Webauthn\PublicKeyCredentialUserEntity; use function array_key_exists; +use function assert; use function in_array; -final class PublicKeyCredentialOptionsDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface +final class PublicKeyCredentialOptionsDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface, NormalizerInterface, NormalizerAwareInterface { use DenormalizerAwareTrait; + use NormalizerAwareTrait; public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -107,6 +112,11 @@ public function supportsDenormalization(mixed $data, string $type, string $forma ); } + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof PublicKeyCredentialCreationOptions || $data instanceof PublicKeyCredentialRequestOptions; + } + /** * @return array */ @@ -117,4 +127,53 @@ public function getSupportedTypes(?string $format): array PublicKeyCredentialRequestOptions::class => true, ]; } + + /** + * @return array + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert( + $data instanceof PublicKeyCredentialCreationOptions || $data instanceof PublicKeyCredentialRequestOptions + ); + $json = [ + 'challenge' => Base64UrlSafe::encodeUnpadded($data->challenge), + 'timeout' => $data->timeout, + 'extensions' => $data->extensions->count() === 0 ? null : $this->normalizer->normalize( + $data->extensions, + $format, + $context + ), + ]; + + if ($data instanceof PublicKeyCredentialCreationOptions) { + $json = [ + ...$json, + 'rp' => $this->normalizer->normalize($data->rp, $format, $context), + 'user' => $this->normalizer->normalize($data->user, $format, $context), + 'pubKeyCredParams' => $this->normalizer->normalize( + $data->pubKeyCredParams, + PublicKeyCredentialParameters::class . '[]', + $context + ), + 'authenticatorSelection' => $data->authenticatorSelection === null ? null : $this->normalizer->normalize( + $data->authenticatorSelection, + $format, + $context + ), + 'attestation' => $data->attestation, + 'excludeCredentials' => $this->normalizer->normalize($data->excludeCredentials, $format, $context), + ]; + } + if ($data instanceof PublicKeyCredentialRequestOptions) { + $json = [ + ...$json, + 'rpId' => $data->rpId, + 'allowCredentials' => $this->normalizer->normalize($data->allowCredentials, $format, $context), + 'userVerification' => $data->userVerification, + ]; + } + + return array_filter($json, static fn ($value) => $value !== null && $value !== []); + } } diff --git a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php index df5992485..bf8a5ae3d 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialSourceDenormalizer.php @@ -4,18 +4,24 @@ namespace Webauthn\Denormalizer; +use ParagonIE\ConstantTime\Base64UrlSafe; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Uid\Uuid; use Webauthn\Exception\InvalidDataException; use Webauthn\PublicKeyCredentialSource; use Webauthn\TrustPath\TrustPath; use Webauthn\Util\Base64; use function array_key_exists; +use function assert; -final class PublicKeyCredentialSourceDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface +final class PublicKeyCredentialSourceDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface, NormalizerInterface, NormalizerAwareInterface { + use NormalizerAwareTrait; use DenormalizerAwareTrait; public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed @@ -57,4 +63,34 @@ public function getSupportedTypes(?string $format): array PublicKeyCredentialSource::class => true, ]; } + + /** + * @return array + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof PublicKeyCredentialSource); + $result = [ + 'publicKeyCredentialId' => Base64UrlSafe::encodeUnpadded($data->publicKeyCredentialId), + 'type' => $data->type, + 'transports' => $data->transports, + 'attestationType' => $data->attestationType, + 'trustPath' => $this->normalizer->normalize($data->trustPath, $format, $context), + 'aaguid' => $this->normalizer->normalize($data->aaguid, $format, $context), + 'credentialPublicKey' => Base64UrlSafe::encodeUnpadded($data->credentialPublicKey), + 'userHandle' => Base64UrlSafe::encodeUnpadded($data->userHandle), + 'counter' => $data->counter, + 'otherUI' => $data->otherUI, + 'backupEligible' => $data->backupEligible, + 'backupStatus' => $data->backupStatus, + 'uvInitialized' => $data->uvInitialized, + ]; + + return array_filter($result, static fn ($value): bool => $value !== null); + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof PublicKeyCredentialSource; + } } diff --git a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php index 4d3423835..275b2548a 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/PublicKeyCredentialUserEntityDenormalizer.php @@ -4,17 +4,16 @@ namespace Webauthn\Denormalizer; -use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; -use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; +use ParagonIE\ConstantTime\Base64UrlSafe; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Webauthn\PublicKeyCredentialUserEntity; use Webauthn\Util\Base64; use function array_key_exists; +use function assert; -final class PublicKeyCredentialUserEntityDenormalizer implements DenormalizerInterface, DenormalizerAwareInterface +final class PublicKeyCredentialUserEntityDenormalizer implements DenormalizerInterface, NormalizerInterface { - use DenormalizerAwareTrait; - public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { if (! array_key_exists('id', $data)) { @@ -44,4 +43,25 @@ public function getSupportedTypes(?string $format): array PublicKeyCredentialUserEntity::class => true, ]; } + + /** + * @return array + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof PublicKeyCredentialUserEntity); + $normalized = [ + 'id' => Base64UrlSafe::encodeUnpadded($data->id), + 'name' => $data->name, + 'displayName' => $data->displayName, + 'icon' => $data->icon, + ]; + + return array_filter($normalized, fn ($value) => $value !== null); + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof PublicKeyCredentialUserEntity; + } } diff --git a/web-auth/webauthn-lib/src/Denormalizer/TrustPathDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/TrustPathDenormalizer.php index fb020287c..741dbcd83 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/TrustPathDenormalizer.php +++ b/web-auth/webauthn-lib/src/Denormalizer/TrustPathDenormalizer.php @@ -5,14 +5,16 @@ namespace Webauthn\Denormalizer; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; +use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Webauthn\Exception\InvalidTrustPathException; use Webauthn\TrustPath\CertificateTrustPath; use Webauthn\TrustPath\EcdaaKeyIdTrustPath; use Webauthn\TrustPath\EmptyTrustPath; use Webauthn\TrustPath\TrustPath; use function array_key_exists; +use function assert; -final class TrustPathDenormalizer implements DenormalizerInterface +final class TrustPathDenormalizer implements DenormalizerInterface, NormalizerInterface { public function denormalize(mixed $data, string $type, string $format = null, array $context = []): mixed { @@ -38,4 +40,27 @@ public function getSupportedTypes(?string $format): array TrustPath::class => true, ]; } + + /** + * @return array + */ + public function normalize(mixed $data, ?string $format = null, array $context = []): array + { + assert($data instanceof TrustPath); + return match (true) { + $data instanceof EcdaaKeyIdTrustPath => [ + 'ecdaaKeyId' => $data->getEcdaaKeyId(), + ], + $data instanceof CertificateTrustPath => [ + 'x5c' => $data->certificates, + ], + $data instanceof EmptyTrustPath => [], + default => throw new InvalidTrustPathException('Unsupported trust path type'), + }; + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof TrustPath; + } } diff --git a/web-auth/webauthn-lib/src/Denormalizer/VerificationMethodANDCombinationsDenormalizer.php b/web-auth/webauthn-lib/src/Denormalizer/VerificationMethodANDCombinationsDenormalizer.php new file mode 100644 index 000000000..64f69439e --- /dev/null +++ b/web-auth/webauthn-lib/src/Denormalizer/VerificationMethodANDCombinationsDenormalizer.php @@ -0,0 +1,45 @@ + + */ + public function getSupportedTypes(?string $format): array + { + return [ + VerificationMethodANDCombinations::class => true, + ]; + } + + /** + * @return array + */ + public function normalize(mixed $object, ?string $format = null, array $context = []): array + { + assert($object instanceof VerificationMethodANDCombinations); + + return array_map( + fn ($verificationMethod) => $this->normalizer->normalize($verificationMethod, $format, $context), + $object->verificationMethods + ); + } + + public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool + { + return $data instanceof VerificationMethodANDCombinations; + } +} diff --git a/web-auth/webauthn-lib/src/Denormalizer/WebauthnSerializerFactory.php b/web-auth/webauthn-lib/src/Denormalizer/WebauthnSerializerFactory.php index 304cd035b..be9f7ce26 100644 --- a/web-auth/webauthn-lib/src/Denormalizer/WebauthnSerializerFactory.php +++ b/web-auth/webauthn-lib/src/Denormalizer/WebauthnSerializerFactory.php @@ -42,6 +42,11 @@ public function create(): SerializerInterface } $denormalizers = [ + new ExtensionDescriptorDenormalizer(), + new VerificationMethodANDCombinationsDenormalizer(), + new AuthenticationExtensionNormalizer(), + new PublicKeyCredentialDescriptorNormalizer(), + new AttestedCredentialDataNormalizer(), new AttestationObjectDenormalizer(), new AttestationStatementDenormalizer($this->attestationStatementSupportManager), new AuthenticationExtensionsDenormalizer(), diff --git a/web-auth/webauthn-lib/src/Event/AttestationObjectLoaded.php b/web-auth/webauthn-lib/src/Event/AttestationObjectLoaded.php index c7ac5550a..f3cbb14bc 100644 --- a/web-auth/webauthn-lib/src/Event/AttestationObjectLoaded.php +++ b/web-auth/webauthn-lib/src/Event/AttestationObjectLoaded.php @@ -5,7 +5,6 @@ namespace Webauthn\Event; use Webauthn\AttestationStatement\AttestationObject; -use Webauthn\MetadataService\Event\WebauthnEvent; class AttestationObjectLoaded implements WebauthnEvent { diff --git a/web-auth/webauthn-lib/src/Event/AttestationStatementLoaded.php b/web-auth/webauthn-lib/src/Event/AttestationStatementLoaded.php index bbb46ea7d..100b880a7 100644 --- a/web-auth/webauthn-lib/src/Event/AttestationStatementLoaded.php +++ b/web-auth/webauthn-lib/src/Event/AttestationStatementLoaded.php @@ -5,7 +5,6 @@ namespace Webauthn\Event; use Webauthn\AttestationStatement\AttestationStatement; -use Webauthn\MetadataService\Event\WebauthnEvent; class AttestationStatementLoaded implements WebauthnEvent { diff --git a/web-auth/metadata-service/src/Event/BeforeCertificateChainValidation.php b/web-auth/webauthn-lib/src/Event/BeforeCertificateChainValidation.php similarity index 81% rename from web-auth/metadata-service/src/Event/BeforeCertificateChainValidation.php rename to web-auth/webauthn-lib/src/Event/BeforeCertificateChainValidation.php index a6fc4d72c..f871ae039 100644 --- a/web-auth/metadata-service/src/Event/BeforeCertificateChainValidation.php +++ b/web-auth/webauthn-lib/src/Event/BeforeCertificateChainValidation.php @@ -2,9 +2,12 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; -final class BeforeCertificateChainValidation implements WebauthnEvent +/** + * @final + */ +class BeforeCertificateChainValidation implements WebauthnEvent { /** * @param string[] $untrustedCertificates diff --git a/web-auth/metadata-service/src/Event/CanDispatchEvents.php b/web-auth/webauthn-lib/src/Event/CanDispatchEvents.php similarity index 83% rename from web-auth/metadata-service/src/Event/CanDispatchEvents.php rename to web-auth/webauthn-lib/src/Event/CanDispatchEvents.php index 6f5ae4590..6996a051e 100644 --- a/web-auth/metadata-service/src/Event/CanDispatchEvents.php +++ b/web-auth/webauthn-lib/src/Event/CanDispatchEvents.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; use Psr\EventDispatcher\EventDispatcherInterface; diff --git a/web-auth/metadata-service/src/Event/CertificateChainValidationFailed.php b/web-auth/webauthn-lib/src/Event/CertificateChainValidationFailed.php similarity index 81% rename from web-auth/metadata-service/src/Event/CertificateChainValidationFailed.php rename to web-auth/webauthn-lib/src/Event/CertificateChainValidationFailed.php index 7c08878d5..69b016b69 100644 --- a/web-auth/metadata-service/src/Event/CertificateChainValidationFailed.php +++ b/web-auth/webauthn-lib/src/Event/CertificateChainValidationFailed.php @@ -2,9 +2,12 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; -final class CertificateChainValidationFailed implements WebauthnEvent +/** + * @final + */ +class CertificateChainValidationFailed implements WebauthnEvent { /** * @param string[] $untrustedCertificates diff --git a/web-auth/metadata-service/src/Event/CertificateChainValidationSucceeded.php b/web-auth/webauthn-lib/src/Event/CertificateChainValidationSucceeded.php similarity index 81% rename from web-auth/metadata-service/src/Event/CertificateChainValidationSucceeded.php rename to web-auth/webauthn-lib/src/Event/CertificateChainValidationSucceeded.php index c031a178f..2fce01694 100644 --- a/web-auth/metadata-service/src/Event/CertificateChainValidationSucceeded.php +++ b/web-auth/webauthn-lib/src/Event/CertificateChainValidationSucceeded.php @@ -2,9 +2,12 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; -final class CertificateChainValidationSucceeded implements WebauthnEvent +/** + * @final + */ +class CertificateChainValidationSucceeded implements WebauthnEvent { /** * @param string[] $untrustedCertificates diff --git a/web-auth/metadata-service/src/Event/MetadataStatementFound.php b/web-auth/webauthn-lib/src/Event/MetadataStatementFound.php similarity index 76% rename from web-auth/metadata-service/src/Event/MetadataStatementFound.php rename to web-auth/webauthn-lib/src/Event/MetadataStatementFound.php index 9f5716d66..b9b52e111 100644 --- a/web-auth/metadata-service/src/Event/MetadataStatementFound.php +++ b/web-auth/webauthn-lib/src/Event/MetadataStatementFound.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; use Webauthn\MetadataService\Statement\MetadataStatement; -final class MetadataStatementFound implements WebauthnEvent +/** + * @final + */ +class MetadataStatementFound implements WebauthnEvent { public function __construct( public readonly MetadataStatement $metadataStatement diff --git a/web-auth/metadata-service/src/Event/NullEventDispatcher.php b/web-auth/webauthn-lib/src/Event/NullEventDispatcher.php similarity index 61% rename from web-auth/metadata-service/src/Event/NullEventDispatcher.php rename to web-auth/webauthn-lib/src/Event/NullEventDispatcher.php index 979502032..76de5b214 100644 --- a/web-auth/metadata-service/src/Event/NullEventDispatcher.php +++ b/web-auth/webauthn-lib/src/Event/NullEventDispatcher.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; use Psr\EventDispatcher\EventDispatcherInterface; -final class NullEventDispatcher implements EventDispatcherInterface +/** + * @final + */ +class NullEventDispatcher implements EventDispatcherInterface { public function dispatch(object $event): object { diff --git a/web-auth/metadata-service/src/Event/WebauthnEvent.php b/web-auth/webauthn-lib/src/Event/WebauthnEvent.php similarity index 59% rename from web-auth/metadata-service/src/Event/WebauthnEvent.php rename to web-auth/webauthn-lib/src/Event/WebauthnEvent.php index 302f9ffb1..d04959253 100644 --- a/web-auth/metadata-service/src/Event/WebauthnEvent.php +++ b/web-auth/webauthn-lib/src/Event/WebauthnEvent.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Event; +namespace Webauthn\Event; interface WebauthnEvent { diff --git a/web-auth/metadata-service/src/Exception/CertificateChainException.php b/web-auth/webauthn-lib/src/Exception/CertificateChainException.php similarity index 95% rename from web-auth/metadata-service/src/Exception/CertificateChainException.php rename to web-auth/webauthn-lib/src/Exception/CertificateChainException.php index 6a83bbb1b..27360fa37 100644 --- a/web-auth/metadata-service/src/Exception/CertificateChainException.php +++ b/web-auth/webauthn-lib/src/Exception/CertificateChainException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; diff --git a/web-auth/metadata-service/src/Exception/CertificateException.php b/web-auth/webauthn-lib/src/Exception/CertificateException.php similarity index 87% rename from web-auth/metadata-service/src/Exception/CertificateException.php rename to web-auth/webauthn-lib/src/Exception/CertificateException.php index 98c9fbda2..259277627 100644 --- a/web-auth/metadata-service/src/Exception/CertificateException.php +++ b/web-auth/webauthn-lib/src/Exception/CertificateException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; diff --git a/web-auth/metadata-service/src/Exception/CertificateRevocationListException.php b/web-auth/webauthn-lib/src/Exception/CertificateRevocationListException.php similarity index 77% rename from web-auth/metadata-service/src/Exception/CertificateRevocationListException.php rename to web-auth/webauthn-lib/src/Exception/CertificateRevocationListException.php index 17736262a..db8673629 100644 --- a/web-auth/metadata-service/src/Exception/CertificateRevocationListException.php +++ b/web-auth/webauthn-lib/src/Exception/CertificateRevocationListException.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; -final class CertificateRevocationListException extends MetadataServiceException +/** + * @final + */ +class CertificateRevocationListException extends MetadataServiceException { public function __construct( public readonly string $url, diff --git a/web-auth/metadata-service/src/Exception/ExpiredCertificateException.php b/web-auth/webauthn-lib/src/Exception/ExpiredCertificateException.php similarity index 71% rename from web-auth/metadata-service/src/Exception/ExpiredCertificateException.php rename to web-auth/webauthn-lib/src/Exception/ExpiredCertificateException.php index 9c00dcd5c..743e18adc 100644 --- a/web-auth/metadata-service/src/Exception/ExpiredCertificateException.php +++ b/web-auth/webauthn-lib/src/Exception/ExpiredCertificateException.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; -final class ExpiredCertificateException extends CertificateException +/** + * @final + */ +class ExpiredCertificateException extends CertificateException { public static function create( string $certificate, diff --git a/web-auth/metadata-service/src/Exception/InvalidCertificateException.php b/web-auth/webauthn-lib/src/Exception/InvalidCertificateException.php similarity index 78% rename from web-auth/metadata-service/src/Exception/InvalidCertificateException.php rename to web-auth/webauthn-lib/src/Exception/InvalidCertificateException.php index cdee978df..d9422c264 100644 --- a/web-auth/metadata-service/src/Exception/InvalidCertificateException.php +++ b/web-auth/webauthn-lib/src/Exception/InvalidCertificateException.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; -final class InvalidCertificateException extends MetadataServiceException +/** + * @final + */ +class InvalidCertificateException extends MetadataServiceException { public function __construct( public readonly string $certificate, diff --git a/web-auth/metadata-service/src/Exception/MetadataServiceException.php b/web-auth/webauthn-lib/src/Exception/MetadataServiceException.php similarity index 85% rename from web-auth/metadata-service/src/Exception/MetadataServiceException.php rename to web-auth/webauthn-lib/src/Exception/MetadataServiceException.php index 5c92614a7..a6afce46c 100644 --- a/web-auth/metadata-service/src/Exception/MetadataServiceException.php +++ b/web-auth/webauthn-lib/src/Exception/MetadataServiceException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Exception; use Throwable; diff --git a/web-auth/metadata-service/src/Exception/MetadataStatementException.php b/web-auth/webauthn-lib/src/Exception/MetadataStatementException.php similarity index 69% rename from web-auth/metadata-service/src/Exception/MetadataStatementException.php rename to web-auth/webauthn-lib/src/Exception/MetadataStatementException.php index e6c16d1c8..e2ef552dc 100644 --- a/web-auth/metadata-service/src/Exception/MetadataStatementException.php +++ b/web-auth/webauthn-lib/src/Exception/MetadataStatementException.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; class MetadataStatementException extends MetadataServiceException { diff --git a/web-auth/metadata-service/src/Exception/MetadataStatementLoadingException.php b/web-auth/webauthn-lib/src/Exception/MetadataStatementLoadingException.php similarity index 67% rename from web-auth/metadata-service/src/Exception/MetadataStatementLoadingException.php rename to web-auth/webauthn-lib/src/Exception/MetadataStatementLoadingException.php index 6a365744c..632e896df 100644 --- a/web-auth/metadata-service/src/Exception/MetadataStatementLoadingException.php +++ b/web-auth/webauthn-lib/src/Exception/MetadataStatementLoadingException.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; -final class MetadataStatementLoadingException extends MetadataStatementException +/** + * @final + */ +class MetadataStatementLoadingException extends MetadataStatementException { public static function create( string $message = 'Unable to load the metadata statement', diff --git a/web-auth/metadata-service/src/Exception/MissingMetadataStatementException.php b/web-auth/webauthn-lib/src/Exception/MissingMetadataStatementException.php similarity index 79% rename from web-auth/metadata-service/src/Exception/MissingMetadataStatementException.php rename to web-auth/webauthn-lib/src/Exception/MissingMetadataStatementException.php index 01fc2e3cd..2552111d1 100644 --- a/web-auth/metadata-service/src/Exception/MissingMetadataStatementException.php +++ b/web-auth/webauthn-lib/src/Exception/MissingMetadataStatementException.php @@ -2,11 +2,14 @@ declare(strict_types=1); -namespace Webauthn\MetadataService\Exception; +namespace Webauthn\Exception; use Throwable; -final class MissingMetadataStatementException extends MetadataStatementException +/** + * @final + */ +class MissingMetadataStatementException extends MetadataStatementException { public function __construct( public readonly string $aaguid, diff --git a/web-auth/webauthn-lib/src/Exception/RevokedCertificateException.php b/web-auth/webauthn-lib/src/Exception/RevokedCertificateException.php new file mode 100644 index 000000000..93b439d57 --- /dev/null +++ b/web-auth/webauthn-lib/src/Exception/RevokedCertificateException.php @@ -0,0 +1,12 @@ +create(); + } +} diff --git a/web-auth/webauthn-lib/src/MetadataService/Event/BeforeCertificateChainValidation.php b/web-auth/webauthn-lib/src/MetadataService/Event/BeforeCertificateChainValidation.php new file mode 100644 index 000000000..bf6f5f910 --- /dev/null +++ b/web-auth/webauthn-lib/src/MetadataService/Event/BeforeCertificateChainValidation.php @@ -0,0 +1,14 @@ +serializer = $serializer ?? MetadataStatementSerializerFactory::create(); + $this->serializer = $serializer ?? (new WebauthnSerializerFactory( + AttestationStatementSupportManager::create() + ))->create(); $this->dispatcher = new NullEventDispatcher(); } diff --git a/web-auth/metadata-service/src/Service/FidoAllianceCompliantMetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php similarity index 95% rename from web-auth/metadata-service/src/Service/FidoAllianceCompliantMetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php index bcef7c18b..5182a8109 100644 --- a/web-auth/metadata-service/src/Service/FidoAllianceCompliantMetadataService.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php @@ -16,14 +16,15 @@ use Symfony\Component\Serializer\SerializerInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use Throwable; +use Webauthn\AttestationStatement\AttestationStatementSupportManager; +use Webauthn\Denormalizer\WebauthnSerializerFactory; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\MetadataStatementFound; +use Webauthn\Event\NullEventDispatcher; +use Webauthn\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MissingMetadataStatementException; use Webauthn\MetadataService\CertificateChain\CertificateChainValidator; use Webauthn\MetadataService\CertificateChain\CertificateToolbox; -use Webauthn\MetadataService\Denormalizer\MetadataStatementSerializerFactory; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\MetadataStatementFound; -use Webauthn\MetadataService\Event\NullEventDispatcher; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; -use Webauthn\MetadataService\Exception\MissingMetadataStatementException; use Webauthn\MetadataService\Statement\MetadataStatement; use Webauthn\MetadataService\Statement\StatusReport; use function array_key_exists; @@ -68,7 +69,9 @@ public function __construct( 'The parameter "$requestFactory" will be removed in 5.0.0. Please set it to null and set an Symfony\Contracts\HttpClient\HttpClientInterface as "$httpClient" argument.' ); } - $this->serializer = $serializer ?? MetadataStatementSerializerFactory::create(); + $this->serializer = $serializer ?? (new WebauthnSerializerFactory( + AttestationStatementSupportManager::create() + ))->create(); $this->dispatcher = new NullEventDispatcher(); } diff --git a/web-auth/metadata-service/src/Service/FolderResourceMetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/FolderResourceMetadataService.php similarity index 87% rename from web-auth/metadata-service/src/Service/FolderResourceMetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/FolderResourceMetadataService.php index c14f5eceb..e554ed9a9 100644 --- a/web-auth/metadata-service/src/Service/FolderResourceMetadataService.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/FolderResourceMetadataService.php @@ -6,8 +6,9 @@ use InvalidArgumentException; use Symfony\Component\Serializer\SerializerInterface; -use Webauthn\MetadataService\Denormalizer\MetadataStatementSerializerFactory; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\AttestationStatement\AttestationStatementSupportManager; +use Webauthn\Denormalizer\WebauthnSerializerFactory; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\Statement\MetadataStatement; use function file_get_contents; use function is_array; @@ -22,7 +23,9 @@ public function __construct( private string $rootPath, ?SerializerInterface $serializer = null, ) { - $this->serializer = $serializer ?? MetadataStatementSerializerFactory::create(); + $this->serializer = $serializer ?? (new WebauthnSerializerFactory( + AttestationStatementSupportManager::create() + ))->create(); $this->rootPath = rtrim($rootPath, DIRECTORY_SEPARATOR); is_dir($this->rootPath) || throw new InvalidArgumentException('The given parameter is not a valid folder.'); is_readable($this->rootPath) || throw new InvalidArgumentException( diff --git a/web-auth/metadata-service/src/Service/InMemoryMetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/InMemoryMetadataService.php similarity index 88% rename from web-auth/metadata-service/src/Service/InMemoryMetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/InMemoryMetadataService.php index c1e5f1a51..6ff6f9943 100644 --- a/web-auth/metadata-service/src/Service/InMemoryMetadataService.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/InMemoryMetadataService.php @@ -5,10 +5,10 @@ namespace Webauthn\MetadataService\Service; use Psr\EventDispatcher\EventDispatcherInterface; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\MetadataStatementFound; -use Webauthn\MetadataService\Event\NullEventDispatcher; -use Webauthn\MetadataService\Exception\MissingMetadataStatementException; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\MetadataStatementFound; +use Webauthn\Event\NullEventDispatcher; +use Webauthn\Exception\MissingMetadataStatementException; use Webauthn\MetadataService\Statement\MetadataStatement; use function array_key_exists; diff --git a/web-auth/metadata-service/src/Service/JsonMetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/JsonMetadataService.php similarity index 81% rename from web-auth/metadata-service/src/Service/JsonMetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/JsonMetadataService.php index 7aa57e814..62bb5df4d 100644 --- a/web-auth/metadata-service/src/Service/JsonMetadataService.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/JsonMetadataService.php @@ -6,11 +6,12 @@ use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Serializer\SerializerInterface; -use Webauthn\MetadataService\Denormalizer\MetadataStatementSerializerFactory; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\MetadataStatementFound; -use Webauthn\MetadataService\Event\NullEventDispatcher; -use Webauthn\MetadataService\Exception\MissingMetadataStatementException; +use Webauthn\AttestationStatement\AttestationStatementSupportManager; +use Webauthn\Denormalizer\WebauthnSerializerFactory; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\MetadataStatementFound; +use Webauthn\Event\NullEventDispatcher; +use Webauthn\Exception\MissingMetadataStatementException; use Webauthn\MetadataService\Statement\MetadataStatement; use function array_key_exists; @@ -33,7 +34,9 @@ public function __construct( ?SerializerInterface $serializer = null, ) { $this->dispatcher = new NullEventDispatcher(); - $this->serializer = $serializer ?? MetadataStatementSerializerFactory::create(); + $this->serializer = $serializer ?? (new WebauthnSerializerFactory( + AttestationStatementSupportManager::create() + ))->create(); foreach ($statements as $statement) { $this->addStatement($statement); } diff --git a/web-auth/metadata-service/src/Service/LocalResourceMetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/LocalResourceMetadataService.php similarity index 84% rename from web-auth/metadata-service/src/Service/LocalResourceMetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/LocalResourceMetadataService.php index b522c2a2b..c510d4fd4 100644 --- a/web-auth/metadata-service/src/Service/LocalResourceMetadataService.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/LocalResourceMetadataService.php @@ -7,12 +7,13 @@ use ParagonIE\ConstantTime\Base64; use Psr\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Serializer\SerializerInterface; -use Webauthn\MetadataService\Denormalizer\MetadataStatementSerializerFactory; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\MetadataStatementFound; -use Webauthn\MetadataService\Event\NullEventDispatcher; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; -use Webauthn\MetadataService\Exception\MissingMetadataStatementException; +use Webauthn\AttestationStatement\AttestationStatementSupportManager; +use Webauthn\Denormalizer\WebauthnSerializerFactory; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\MetadataStatementFound; +use Webauthn\Event\NullEventDispatcher; +use Webauthn\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MissingMetadataStatementException; use Webauthn\MetadataService\Statement\MetadataStatement; use function file_get_contents; @@ -29,7 +30,9 @@ public function __construct( private readonly bool $isBase64Encoded = false, ?SerializerInterface $serializer = null, ) { - $this->serializer = $serializer ?? MetadataStatementSerializerFactory::create(); + $this->serializer = $serializer ?? (new WebauthnSerializerFactory( + AttestationStatementSupportManager::create() + ))->create(); $this->dispatcher = new NullEventDispatcher(); } diff --git a/web-auth/metadata-service/src/Service/MetadataBLOBPayload.php b/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayload.php similarity index 88% rename from web-auth/metadata-service/src/Service/MetadataBLOBPayload.php rename to web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayload.php index 3ab82458d..0bd5df806 100644 --- a/web-auth/metadata-service/src/Service/MetadataBLOBPayload.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayload.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Service; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; use function is_array; @@ -116,6 +116,18 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'legalHeader' => $this->legalHeader, 'nextUpdate' => $this->nextUpdate, diff --git a/web-auth/metadata-service/src/Service/MetadataBLOBPayloadEntry.php b/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayloadEntry.php similarity index 96% rename from web-auth/metadata-service/src/Service/MetadataBLOBPayloadEntry.php rename to web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayloadEntry.php index f1d9011a7..3e06cfdeb 100644 --- a/web-auth/metadata-service/src/Service/MetadataBLOBPayloadEntry.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/MetadataBLOBPayloadEntry.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Service; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\Statement\BiometricStatusReport; use Webauthn\MetadataService\Statement\MetadataStatement; use Webauthn\MetadataService\Statement\StatusReport; @@ -210,6 +210,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'aaid' => $this->aaid, 'aaguid' => $this->aaguid, diff --git a/web-auth/metadata-service/src/Service/MetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/MetadataService.php similarity index 100% rename from web-auth/metadata-service/src/Service/MetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/MetadataService.php diff --git a/web-auth/metadata-service/src/Service/StringMetadataService.php b/web-auth/webauthn-lib/src/MetadataService/Service/StringMetadataService.php similarity index 89% rename from web-auth/metadata-service/src/Service/StringMetadataService.php rename to web-auth/webauthn-lib/src/MetadataService/Service/StringMetadataService.php index 4edea340c..2df755c40 100644 --- a/web-auth/metadata-service/src/Service/StringMetadataService.php +++ b/web-auth/webauthn-lib/src/MetadataService/Service/StringMetadataService.php @@ -5,10 +5,10 @@ namespace Webauthn\MetadataService\Service; use Psr\EventDispatcher\EventDispatcherInterface; -use Webauthn\MetadataService\Event\CanDispatchEvents; -use Webauthn\MetadataService\Event\MetadataStatementFound; -use Webauthn\MetadataService\Event\NullEventDispatcher; -use Webauthn\MetadataService\Exception\MissingMetadataStatementException; +use Webauthn\Event\CanDispatchEvents; +use Webauthn\Event\MetadataStatementFound; +use Webauthn\Event\NullEventDispatcher; +use Webauthn\Exception\MissingMetadataStatementException; use Webauthn\MetadataService\Statement\MetadataStatement; use function array_key_exists; diff --git a/web-auth/metadata-service/src/Statement/AbstractDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/AbstractDescriptor.php similarity index 93% rename from web-auth/metadata-service/src/Statement/AbstractDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/AbstractDescriptor.php index 08f1de461..494cc0601 100644 --- a/web-auth/metadata-service/src/Statement/AbstractDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/AbstractDescriptor.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; abstract class AbstractDescriptor implements JsonSerializable { diff --git a/web-auth/metadata-service/src/Statement/AlternativeDescriptions.php b/web-auth/webauthn-lib/src/MetadataService/Statement/AlternativeDescriptions.php similarity index 83% rename from web-auth/metadata-service/src/Statement/AlternativeDescriptions.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/AlternativeDescriptions.php index 228811e08..0baf0f2f4 100644 --- a/web-auth/metadata-service/src/Statement/AlternativeDescriptions.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/AlternativeDescriptions.php @@ -50,6 +50,12 @@ public function add(string $locale, string $description): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return $this->descriptions; } } diff --git a/web-auth/metadata-service/src/Statement/AuthenticatorGetInfo.php b/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorGetInfo.php similarity index 78% rename from web-auth/metadata-service/src/Statement/AuthenticatorGetInfo.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorGetInfo.php index a39f98309..c1360a61b 100644 --- a/web-auth/metadata-service/src/Statement/AuthenticatorGetInfo.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorGetInfo.php @@ -40,6 +40,12 @@ public function add(string|int $key, mixed $value): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return $this->info; } } diff --git a/web-auth/metadata-service/src/Statement/AuthenticatorStatus.php b/web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorStatus.php similarity index 100% rename from web-auth/metadata-service/src/Statement/AuthenticatorStatus.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/AuthenticatorStatus.php diff --git a/web-auth/metadata-service/src/Statement/BiometricAccuracyDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricAccuracyDescriptor.php similarity index 90% rename from web-auth/metadata-service/src/Statement/BiometricAccuracyDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/BiometricAccuracyDescriptor.php index 14c0e34d4..916398c82 100644 --- a/web-auth/metadata-service/src/Statement/BiometricAccuracyDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricAccuracyDescriptor.php @@ -74,6 +74,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'selfAttestedFRR' => $this->selfAttestedFRR, 'selfAttestedFAR' => $this->selfAttestedFAR, diff --git a/web-auth/metadata-service/src/Statement/BiometricStatusReport.php b/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricStatusReport.php similarity index 94% rename from web-auth/metadata-service/src/Statement/BiometricStatusReport.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/BiometricStatusReport.php index a6b0f3a93..ab5472f82 100644 --- a/web-auth/metadata-service/src/Statement/BiometricStatusReport.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/BiometricStatusReport.php @@ -125,6 +125,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'certLevel' => $this->certLevel, 'modality' => $this->modality, diff --git a/web-auth/metadata-service/src/Statement/CodeAccuracyDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/CodeAccuracyDescriptor.php similarity index 89% rename from web-auth/metadata-service/src/Statement/CodeAccuracyDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/CodeAccuracyDescriptor.php index cb15d7609..aa7f8f0f6 100644 --- a/web-auth/metadata-service/src/Statement/CodeAccuracyDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/CodeAccuracyDescriptor.php @@ -4,7 +4,7 @@ namespace Webauthn\MetadataService\Statement; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; @@ -77,6 +77,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'base' => $this->base, 'minLength' => $this->minLength, diff --git a/web-auth/metadata-service/src/Statement/DisplayPNGCharacteristicsDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php similarity index 94% rename from web-auth/metadata-service/src/Statement/DisplayPNGCharacteristicsDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php index 202264702..f69703038 100644 --- a/web-auth/metadata-service/src/Statement/DisplayPNGCharacteristicsDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/DisplayPNGCharacteristicsDescriptor.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; @@ -184,6 +184,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'width' => $this->width, 'height' => $this->height, diff --git a/web-auth/metadata-service/src/Statement/EcdaaTrustAnchor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/EcdaaTrustAnchor.php similarity index 89% rename from web-auth/metadata-service/src/Statement/EcdaaTrustAnchor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/EcdaaTrustAnchor.php index fd426c13a..c55171b32 100644 --- a/web-auth/metadata-service/src/Statement/EcdaaTrustAnchor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/EcdaaTrustAnchor.php @@ -6,7 +6,7 @@ use JsonSerializable; use ParagonIE\ConstantTime\Base64UrlSafe; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; @@ -87,6 +87,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'X' => Base64UrlSafe::encodeUnpadded($this->X), 'Y' => Base64UrlSafe::encodeUnpadded($this->Y), diff --git a/web-auth/metadata-service/src/Statement/ExtensionDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/ExtensionDescriptor.php similarity index 90% rename from web-auth/metadata-service/src/Statement/ExtensionDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/ExtensionDescriptor.php index 4b0404367..9c6b0a76d 100644 --- a/web-auth/metadata-service/src/Statement/ExtensionDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/ExtensionDescriptor.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; @@ -94,6 +94,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $result = [ 'id' => $this->id, 'tag' => $this->tag, diff --git a/web-auth/metadata-service/src/Statement/MetadataStatement.php b/web-auth/webauthn-lib/src/MetadataService/Statement/MetadataStatement.php similarity index 98% rename from web-auth/metadata-service/src/Statement/MetadataStatement.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/MetadataStatement.php index 69685bc66..899430eaf 100644 --- a/web-auth/metadata-service/src/Statement/MetadataStatement.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/MetadataStatement.php @@ -5,8 +5,8 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\CertificateChain\CertificateToolbox; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; use function is_array; @@ -361,7 +361,7 @@ public function getDescription(): string * @deprecated since 4.7.0. Please use the property directly. * @infection-ignore-all */ - public function getAlternativeDescriptions(): AlternativeDescriptions + public function getAlternativeDescriptions(): null|AlternativeDescriptions { return $this->alternativeDescriptions; } @@ -658,6 +658,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'legalHeader' => $this->legalHeader, 'aaid' => $this->aaid, diff --git a/web-auth/metadata-service/src/Statement/PatternAccuracyDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/PatternAccuracyDescriptor.php similarity index 88% rename from web-auth/metadata-service/src/Statement/PatternAccuracyDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/PatternAccuracyDescriptor.php index 9838e1db2..f065bbeec 100644 --- a/web-auth/metadata-service/src/Statement/PatternAccuracyDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/PatternAccuracyDescriptor.php @@ -4,7 +4,7 @@ namespace Webauthn\MetadataService\Statement; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; use function is_int; @@ -65,6 +65,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'minComplexity' => $this->minComplexity, 'maxRetries' => $this->maxRetries, diff --git a/web-auth/metadata-service/src/Statement/RgbPaletteEntry.php b/web-auth/webauthn-lib/src/MetadataService/Statement/RgbPaletteEntry.php similarity index 88% rename from web-auth/metadata-service/src/Statement/RgbPaletteEntry.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/RgbPaletteEntry.php index a2bd1ea32..ca850789a 100644 --- a/web-auth/metadata-service/src/Statement/RgbPaletteEntry.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/RgbPaletteEntry.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use function array_key_exists; use function is_int; @@ -78,6 +78,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return [ 'r' => $this->r, 'g' => $this->g, diff --git a/web-auth/metadata-service/src/Statement/RogueListEntry.php b/web-auth/webauthn-lib/src/MetadataService/Statement/RogueListEntry.php similarity index 86% rename from web-auth/metadata-service/src/Statement/RogueListEntry.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/RogueListEntry.php index bea96c6ad..4cf5f2928 100644 --- a/web-auth/metadata-service/src/Statement/RogueListEntry.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/RogueListEntry.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use function array_key_exists; use function is_string; @@ -62,6 +62,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return [ 'sk' => $this->sk, 'date' => $this->date, diff --git a/web-auth/metadata-service/src/Statement/StatusReport.php b/web-auth/webauthn-lib/src/MetadataService/Statement/StatusReport.php similarity index 95% rename from web-auth/metadata-service/src/Statement/StatusReport.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/StatusReport.php index 45b78f6ae..c1fba596d 100644 --- a/web-auth/metadata-service/src/Statement/StatusReport.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/StatusReport.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; use function in_array; @@ -183,6 +183,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'status' => $this->status, 'effectiveDate' => $this->effectiveDate, diff --git a/web-auth/metadata-service/src/Statement/VerificationMethodANDCombinations.php b/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodANDCombinations.php similarity index 89% rename from web-auth/metadata-service/src/Statement/VerificationMethodANDCombinations.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodANDCombinations.php index 174dcc83a..581d5f596 100644 --- a/web-auth/metadata-service/src/Statement/VerificationMethodANDCombinations.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodANDCombinations.php @@ -68,6 +68,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return $this->verificationMethods; } } diff --git a/web-auth/metadata-service/src/Statement/VerificationMethodDescriptor.php b/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodDescriptor.php similarity index 96% rename from web-auth/metadata-service/src/Statement/VerificationMethodDescriptor.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodDescriptor.php index 3fb2aeb92..fe700f833 100644 --- a/web-auth/metadata-service/src/Statement/VerificationMethodDescriptor.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/VerificationMethodDescriptor.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; use function is_array; @@ -255,6 +255,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'userVerificationMethod' => $this->userVerificationMethod, 'caDesc' => $this->caDesc, diff --git a/web-auth/metadata-service/src/Statement/Version.php b/web-auth/webauthn-lib/src/MetadataService/Statement/Version.php similarity index 88% rename from web-auth/metadata-service/src/Statement/Version.php rename to web-auth/webauthn-lib/src/MetadataService/Statement/Version.php index 8588e6201..1a0f77153 100644 --- a/web-auth/metadata-service/src/Statement/Version.php +++ b/web-auth/webauthn-lib/src/MetadataService/Statement/Version.php @@ -5,7 +5,7 @@ namespace Webauthn\MetadataService\Statement; use JsonSerializable; -use Webauthn\MetadataService\Exception\MetadataStatementLoadingException; +use Webauthn\Exception\MetadataStatementLoadingException; use Webauthn\MetadataService\ValueFilter; use function array_key_exists; use function is_int; @@ -72,6 +72,12 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $data = [ 'major' => $this->major, 'minor' => $this->minor, diff --git a/web-auth/metadata-service/src/StatusReportRepository.php b/web-auth/webauthn-lib/src/MetadataService/StatusReportRepository.php similarity index 100% rename from web-auth/metadata-service/src/StatusReportRepository.php rename to web-auth/webauthn-lib/src/MetadataService/StatusReportRepository.php diff --git a/web-auth/metadata-service/src/ValueFilter.php b/web-auth/webauthn-lib/src/MetadataService/ValueFilter.php similarity index 100% rename from web-auth/metadata-service/src/ValueFilter.php rename to web-auth/webauthn-lib/src/MetadataService/ValueFilter.php diff --git a/web-auth/webauthn-lib/src/PublicKeyCredential.php b/web-auth/webauthn-lib/src/PublicKeyCredential.php index b4cbd48fc..8e09ad656 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredential.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredential.php @@ -14,16 +14,16 @@ class PublicKeyCredential extends Credential implements Stringable { public function __construct( - string $id, + null|string $id, string $type, - public readonly string $rawId, + string $rawId, public readonly AuthenticatorResponse $response ) { - parent::__construct($id, $type); + parent::__construct($id, $type, $rawId); } /** - * @deprecated since 4.8.0. Please use the PublicKeyCredentialDescriptor ({self::getPublicKeyCredentialDescriptor}) instead. + * @deprecated since 4.8.0. * @infection-ignore-all */ public function __toString(): string @@ -31,7 +31,7 @@ public function __toString(): string return json_encode($this->getPublicKeyCredentialDescriptor(), JSON_THROW_ON_ERROR); } - public static function create(string $id, string $type, string $rawId, AuthenticatorResponse $response): self + public static function create(null|string $id, string $type, string $rawId, AuthenticatorResponse $response): self { return new self($id, $type, $rawId, $response); } diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php b/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php index 1a20ee5ee..3e1377eb5 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php @@ -313,6 +313,12 @@ public static function createFromArray(array $json): static */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $json = [ 'rp' => $this->rp, 'user' => $this->user, diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptor.php b/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptor.php index ba38446e8..3a351be27 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptor.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptor.php @@ -79,6 +79,9 @@ public function getTransports(): array return $this->transports; } + /** + * @deprecated since 4.9.0 and will be removed in 5.0.0. Please use the serializer instead. + */ public static function createFromString(string $data): self { $data = json_decode($data, true, flags: JSON_THROW_ON_ERROR); @@ -88,6 +91,7 @@ public static function createFromString(string $data): self /** * @param mixed[] $json + * @deprecated since 4.9.0 and will be removed in 5.0.0. Please use the serializer instead. */ public static function createFromArray(array $json): self { @@ -107,6 +111,12 @@ public static function createFromArray(array $json): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $json = [ 'type' => $this->type, 'id' => Base64UrlSafe::encodeUnpadded($this->id), diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptorCollection.php b/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptorCollection.php index bbc3a8c1b..d5f1481c9 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptorCollection.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialDescriptorCollection.php @@ -100,6 +100,12 @@ public function count(int $mode = COUNT_NORMAL): int */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return $this->publicKeyCredentialDescriptors; } diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialLoader.php b/web-auth/webauthn-lib/src/PublicKeyCredentialLoader.php index 19861c1a7..88b2a9c17 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialLoader.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialLoader.php @@ -86,7 +86,7 @@ public function loadArray(array $json): PublicKeyCredential hash_equals($id, $rawId) || throw InvalidDataException::create($json, 'Invalid ID'); $publicKeyCredential = PublicKeyCredential::create( - $json['id'], + null, $json['type'], $rawId, $this->createResponse($json['response']) diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialParameters.php b/web-auth/webauthn-lib/src/PublicKeyCredentialParameters.php index 62cfa0534..7ea3cea8f 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialParameters.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialParameters.php @@ -83,6 +83,12 @@ public static function createFromArray(array $json): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return [ 'type' => $this->type, 'alg' => $this->alg, diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialRequestOptions.php b/web-auth/webauthn-lib/src/PublicKeyCredentialRequestOptions.php index 4016f34f6..46b6777d5 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialRequestOptions.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialRequestOptions.php @@ -204,6 +204,12 @@ public static function createFromArray(array $json): static */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $json = [ 'challenge' => Base64UrlSafe::encodeUnpadded($this->challenge), ]; diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialRpEntity.php b/web-auth/webauthn-lib/src/PublicKeyCredentialRpEntity.php index 1720462b9..670daefae 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialRpEntity.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialRpEntity.php @@ -51,6 +51,12 @@ public static function createFromArray(array $json): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $json = parent::jsonSerialize(); if ($this->id !== null) { $json['id'] = $this->id; diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialSource.php b/web-auth/webauthn-lib/src/PublicKeyCredentialSource.php index de55bb104..2aef84ef0 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialSource.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialSource.php @@ -248,7 +248,13 @@ public static function createFromArray(array $data): self */ public function jsonSerialize(): array { - return [ + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); + $result = [ 'publicKeyCredentialId' => Base64UrlSafe::encodeUnpadded($this->publicKeyCredentialId), 'type' => $this->type, 'transports' => $this->transports, @@ -263,5 +269,7 @@ public function jsonSerialize(): array 'backupStatus' => $this->backupStatus, 'uvInitialized' => $this->uvInitialized, ]; + + return array_filter($result, static fn ($value): bool => $value !== null); } } diff --git a/web-auth/webauthn-lib/src/PublicKeyCredentialUserEntity.php b/web-auth/webauthn-lib/src/PublicKeyCredentialUserEntity.php index 53f147d8c..43cdca2eb 100644 --- a/web-auth/webauthn-lib/src/PublicKeyCredentialUserEntity.php +++ b/web-auth/webauthn-lib/src/PublicKeyCredentialUserEntity.php @@ -87,6 +87,12 @@ public static function createFromArray(array $json): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); $json = parent::jsonSerialize(); $json['id'] = Base64UrlSafe::encodeUnpadded($this->id); $json['displayName'] = $this->displayName; diff --git a/web-auth/webauthn-lib/src/SimpleFakeCredentialGenerator.php b/web-auth/webauthn-lib/src/SimpleFakeCredentialGenerator.php new file mode 100644 index 000000000..a0c4fb90d --- /dev/null +++ b/web-auth/webauthn-lib/src/SimpleFakeCredentialGenerator.php @@ -0,0 +1,67 @@ +cache === null) { + return $this->generateCredentials($username); + } + + $cacheKey = 'fake_credentials_' . hash('xxh128', $username); + $cacheItem = $this->cache->getItem($cacheKey); + if ($cacheItem->isHit()) { + return $cacheItem->get(); + } + + $credentials = $this->generateCredentials($username); + $cacheItem->set($credentials); + $this->cache->save($cacheItem); + + return $credentials; + } + + /** + * @return PublicKeyCredentialDescriptor[] + */ + private function generateCredentials(string $username): array + { + $transports = [ + PublicKeyCredentialDescriptor::AUTHENTICATOR_TRANSPORT_USB, + PublicKeyCredentialDescriptor::AUTHENTICATOR_TRANSPORT_NFC, + PublicKeyCredentialDescriptor::AUTHENTICATOR_TRANSPORT_BLE, + ]; + $credentials = []; + for ($i = 0; $i < random_int(1, 3); $i++) { + $randomTransportKeys = array_rand($transports, random_int(1, count($transports))); + if (is_int($randomTransportKeys)) { + $randomTransportKeys = [$randomTransportKeys]; + } + $randomTransports = array_values(array_intersect_key($transports, array_flip($randomTransportKeys))); + $credentials[] = PublicKeyCredentialDescriptor::create( + PublicKeyCredentialDescriptor::CREDENTIAL_TYPE_PUBLIC_KEY, + hash('sha256', random_bytes(16) . $username), + $randomTransports + ); + } + + return $credentials; + } +} diff --git a/web-auth/webauthn-lib/src/TrustPath/CertificateTrustPath.php b/web-auth/webauthn-lib/src/TrustPath/CertificateTrustPath.php index 796511c50..31d250c2e 100644 --- a/web-auth/webauthn-lib/src/TrustPath/CertificateTrustPath.php +++ b/web-auth/webauthn-lib/src/TrustPath/CertificateTrustPath.php @@ -56,6 +56,12 @@ public static function createFromArray(array $data): static */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return [ 'type' => self::class, 'x5c' => $this->certificates, diff --git a/web-auth/webauthn-lib/src/TrustPath/EmptyTrustPath.php b/web-auth/webauthn-lib/src/TrustPath/EmptyTrustPath.php index 744103364..e1acb0aba 100644 --- a/web-auth/webauthn-lib/src/TrustPath/EmptyTrustPath.php +++ b/web-auth/webauthn-lib/src/TrustPath/EmptyTrustPath.php @@ -16,6 +16,12 @@ public static function create(): self */ public function jsonSerialize(): array { + trigger_deprecation( + 'web-auth/webauthn-bundle', + '4.9.0', + 'The "%s" method is deprecated and will be removed in 5.0. Please use the serializer instead.', + __METHOD__ + ); return [ 'type' => self::class, ]; diff --git a/web-auth/webauthn-lib/src/TrustPath/TrustPathLoader.php b/web-auth/webauthn-lib/src/TrustPath/TrustPathLoader.php index e06b1551c..017f55252 100644 --- a/web-auth/webauthn-lib/src/TrustPath/TrustPathLoader.php +++ b/web-auth/webauthn-lib/src/TrustPath/TrustPathLoader.php @@ -6,9 +6,12 @@ use Webauthn\Exception\InvalidTrustPathException; use function array_key_exists; -use function class_implements; -use function in_array; +use function is_array; +use function is_string; +/** + * @deprecated since 4.9.0 and will be removed in 5.0.0. Use the serializer instead + */ final class TrustPathLoader { /** @@ -16,18 +19,15 @@ final class TrustPathLoader */ public static function loadTrustPath(array $data): TrustPath { - array_key_exists('type', $data) || throw InvalidTrustPathException::create('The trust path type is missing'); - $type = $data['type']; - if (class_exists($type) !== true) { - throw InvalidTrustPathException::create( - sprintf('The trust path type "%s" is not supported', $data['type']) - ); - } - - $implements = class_implements($type); - if (in_array(TrustPath::class, $implements, true)) { - return $type::createFromArray($data); - } - throw InvalidTrustPathException::create(sprintf('The trust path type "%s" is not supported', $data['type'])); + return match (true) { + $data === [] || $data === [ + 'type' => EmptyTrustPath::class, + ] => EmptyTrustPath::create(), + array_key_exists('x5c', $data) && is_array($data['x5c']) => CertificateTrustPath::create($data['x5c']), + array_key_exists('ecdaaKeyId', $data) && is_string($data['ecdaaKeyId']) => new EcdaaKeyIdTrustPath( + $data['ecdaaKeyId'] + ), + default => throw InvalidTrustPathException::create('Unsupported trust path'), + }; } }