diff --git a/composer.json b/composer.json index 03c661b..72ff1da 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "psr/log": "^1.1", "ramsey/uuid": "^3.8|^4.0", "spomky-labs/base64url": "^2.0", - "spomky-labs/cbor-php": "^1.1|^2.0", + "spomky-labs/cbor-php": "^1.0|^2.0", "symfony/process": "^3.0|^4.0|^5.0", "thecodingmachine/safe": "^1.1", "web-auth/cose-lib": "self.version", diff --git a/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php b/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php index deac2ba..308bd95 100644 --- a/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php +++ b/src/AttestationStatement/AndroidKeyAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php b/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php index 6ef7de6..29286ba 100644 --- a/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php +++ b/src/AttestationStatement/AndroidSafetyNetAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. @@ -231,13 +231,13 @@ private function getResponseBody(ResponseInterface $response): string { $responseBody = ''; $response->getBody()->rewind(); - do { + while (true) { $tmp = $response->getBody()->read(1024); if ('' === $tmp) { break; } $responseBody .= $tmp; - } while (true); + } return $responseBody; } diff --git a/src/AttestationStatement/AppleAttestationStatementSupport.php b/src/AttestationStatement/AppleAttestationStatementSupport.php index cae8891..53ee648 100644 --- a/src/AttestationStatement/AppleAttestationStatementSupport.php +++ b/src/AttestationStatement/AppleAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/AttestationObject.php b/src/AttestationStatement/AttestationObject.php index 1a0869f..47d0bc9 100644 --- a/src/AttestationStatement/AttestationObject.php +++ b/src/AttestationStatement/AttestationObject.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/AttestationObjectLoader.php b/src/AttestationStatement/AttestationObjectLoader.php index 5c00b0a..f02e19e 100644 --- a/src/AttestationStatement/AttestationObjectLoader.php +++ b/src/AttestationStatement/AttestationObjectLoader.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/AttestationStatement.php b/src/AttestationStatement/AttestationStatement.php index 3de8bfb..1622f64 100644 --- a/src/AttestationStatement/AttestationStatement.php +++ b/src/AttestationStatement/AttestationStatement.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/AttestationStatementSupport.php b/src/AttestationStatement/AttestationStatementSupport.php index 95f1d55..76f1dd4 100644 --- a/src/AttestationStatement/AttestationStatementSupport.php +++ b/src/AttestationStatement/AttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/AttestationStatementSupportManager.php b/src/AttestationStatement/AttestationStatementSupportManager.php index be3bc20..e7cbf75 100644 --- a/src/AttestationStatement/AttestationStatementSupportManager.php +++ b/src/AttestationStatement/AttestationStatementSupportManager.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/FidoU2FAttestationStatementSupport.php b/src/AttestationStatement/FidoU2FAttestationStatementSupport.php index 5e31bd5..7fe326d 100644 --- a/src/AttestationStatement/FidoU2FAttestationStatementSupport.php +++ b/src/AttestationStatement/FidoU2FAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/NoneAttestationStatementSupport.php b/src/AttestationStatement/NoneAttestationStatementSupport.php index 610fb44..8719ae7 100644 --- a/src/AttestationStatement/NoneAttestationStatementSupport.php +++ b/src/AttestationStatement/NoneAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/PackedAttestationStatementSupport.php b/src/AttestationStatement/PackedAttestationStatementSupport.php index bea42c4..58fb637 100644 --- a/src/AttestationStatement/PackedAttestationStatementSupport.php +++ b/src/AttestationStatement/PackedAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestationStatement/TPMAttestationStatementSupport.php b/src/AttestationStatement/TPMAttestationStatementSupport.php index 59e5503..b43effb 100644 --- a/src/AttestationStatement/TPMAttestationStatementSupport.php +++ b/src/AttestationStatement/TPMAttestationStatementSupport.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AttestedCredentialData.php b/src/AttestedCredentialData.php index 24ac5e3..329f2c6 100644 --- a/src/AttestedCredentialData.php +++ b/src/AttestedCredentialData.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/AuthenticationExtension.php b/src/AuthenticationExtensions/AuthenticationExtension.php index 74b8bc5..8a29b1c 100644 --- a/src/AuthenticationExtensions/AuthenticationExtension.php +++ b/src/AuthenticationExtensions/AuthenticationExtension.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/AuthenticationExtensionsClientInputs.php b/src/AuthenticationExtensions/AuthenticationExtensionsClientInputs.php index c2c5a1c..2f171e7 100644 --- a/src/AuthenticationExtensions/AuthenticationExtensionsClientInputs.php +++ b/src/AuthenticationExtensions/AuthenticationExtensionsClientInputs.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputs.php b/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputs.php index 509178f..d6ed0ff 100644 --- a/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputs.php +++ b/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputs.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputsLoader.php b/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputsLoader.php index 1bb4659..b4f69bf 100644 --- a/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputsLoader.php +++ b/src/AuthenticationExtensions/AuthenticationExtensionsClientOutputsLoader.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/ExtensionOutputChecker.php b/src/AuthenticationExtensions/ExtensionOutputChecker.php index 16f6561..e53c88e 100644 --- a/src/AuthenticationExtensions/ExtensionOutputChecker.php +++ b/src/AuthenticationExtensions/ExtensionOutputChecker.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/ExtensionOutputCheckerHandler.php b/src/AuthenticationExtensions/ExtensionOutputCheckerHandler.php index 7d84e7f..8b78c35 100644 --- a/src/AuthenticationExtensions/ExtensionOutputCheckerHandler.php +++ b/src/AuthenticationExtensions/ExtensionOutputCheckerHandler.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticationExtensions/ExtensionOutputError.php b/src/AuthenticationExtensions/ExtensionOutputError.php index 8aef6b2..f16072f 100644 --- a/src/AuthenticationExtensions/ExtensionOutputError.php +++ b/src/AuthenticationExtensions/ExtensionOutputError.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorAssertionResponse.php b/src/AuthenticatorAssertionResponse.php index 0a5bf15..ec325e6 100644 --- a/src/AuthenticatorAssertionResponse.php +++ b/src/AuthenticatorAssertionResponse.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorAssertionResponseValidator.php b/src/AuthenticatorAssertionResponseValidator.php index cddedd5..6b0f0f9 100644 --- a/src/AuthenticatorAssertionResponseValidator.php +++ b/src/AuthenticatorAssertionResponseValidator.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorAttestationResponse.php b/src/AuthenticatorAttestationResponse.php index 2c827c1..7ac9e19 100644 --- a/src/AuthenticatorAttestationResponse.php +++ b/src/AuthenticatorAttestationResponse.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorAttestationResponseValidator.php b/src/AuthenticatorAttestationResponseValidator.php index 4253571..47fb4d2 100644 --- a/src/AuthenticatorAttestationResponseValidator.php +++ b/src/AuthenticatorAttestationResponseValidator.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorData.php b/src/AuthenticatorData.php index e14cc64..086ae50 100644 --- a/src/AuthenticatorData.php +++ b/src/AuthenticatorData.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorResponse.php b/src/AuthenticatorResponse.php index 6e9f553..2bcee45 100644 --- a/src/AuthenticatorResponse.php +++ b/src/AuthenticatorResponse.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/AuthenticatorSelectionCriteria.php b/src/AuthenticatorSelectionCriteria.php index 31e47d6..7f700dd 100644 --- a/src/AuthenticatorSelectionCriteria.php +++ b/src/AuthenticatorSelectionCriteria.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/CertificateChainChecker/CertificateChainChecker.php b/src/CertificateChainChecker/CertificateChainChecker.php index fb33b47..12e9974 100644 --- a/src/CertificateChainChecker/CertificateChainChecker.php +++ b/src/CertificateChainChecker/CertificateChainChecker.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/CertificateChainChecker/OpenSSLCertificateChainChecker.php b/src/CertificateChainChecker/OpenSSLCertificateChainChecker.php index 132358c..39a038d 100644 --- a/src/CertificateChainChecker/OpenSSLCertificateChainChecker.php +++ b/src/CertificateChainChecker/OpenSSLCertificateChainChecker.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/CertificateToolbox.php b/src/CertificateToolbox.php index cfa4054..51a08ab 100644 --- a/src/CertificateToolbox.php +++ b/src/CertificateToolbox.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/CollectedClientData.php b/src/CollectedClientData.php index d2e5287..d020cca 100644 --- a/src/CollectedClientData.php +++ b/src/CollectedClientData.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/Counter/CounterChecker.php b/src/Counter/CounterChecker.php index d0e10e6..ed128bb 100644 --- a/src/Counter/CounterChecker.php +++ b/src/Counter/CounterChecker.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/Counter/ThrowExceptionIfInvalid.php b/src/Counter/ThrowExceptionIfInvalid.php index 0bf0436..801ee3b 100644 --- a/src/Counter/ThrowExceptionIfInvalid.php +++ b/src/Counter/ThrowExceptionIfInvalid.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/Credential.php b/src/Credential.php index 0721239..bfaaadd 100644 --- a/src/Credential.php +++ b/src/Credential.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredential.php b/src/PublicKeyCredential.php index b8aba47..66758a9 100644 --- a/src/PublicKeyCredential.php +++ b/src/PublicKeyCredential.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialCreationOptions.php b/src/PublicKeyCredentialCreationOptions.php index 6506934..84a3d28 100644 --- a/src/PublicKeyCredentialCreationOptions.php +++ b/src/PublicKeyCredentialCreationOptions.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. @@ -212,18 +212,17 @@ public static function createFromArray(array $json): PublicKeyCredentialOptions } } - return self - ::create( + return self::create( PublicKeyCredentialRpEntity::createFromArray($json['rp']), PublicKeyCredentialUserEntity::createFromArray($json['user']), Base64Url::decode($json['challenge']), $pubKeyCredParams ) - ->excludeCredentials($excludeCredentials) - ->setAuthenticatorSelection(AuthenticatorSelectionCriteria::createFromArray($json['authenticatorSelection'])) - ->setAttestation($json['attestation']) - ->setTimeout($json['timeout'] ?? null) - ->setExtensions(isset($json['extensions']) ? AuthenticationExtensionsClientInputs::createFromArray($json['extensions']) : new AuthenticationExtensionsClientInputs()) + ->excludeCredentials($excludeCredentials) + ->setAuthenticatorSelection(AuthenticatorSelectionCriteria::createFromArray($json['authenticatorSelection'])) + ->setAttestation($json['attestation']) + ->setTimeout($json['timeout'] ?? null) + ->setExtensions(isset($json['extensions']) ? AuthenticationExtensionsClientInputs::createFromArray($json['extensions']) : new AuthenticationExtensionsClientInputs()) ; } diff --git a/src/PublicKeyCredentialDescriptor.php b/src/PublicKeyCredentialDescriptor.php index ed0fa92..0008f10 100644 --- a/src/PublicKeyCredentialDescriptor.php +++ b/src/PublicKeyCredentialDescriptor.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialDescriptorCollection.php b/src/PublicKeyCredentialDescriptorCollection.php index d6660a2..822b473 100644 --- a/src/PublicKeyCredentialDescriptorCollection.php +++ b/src/PublicKeyCredentialDescriptorCollection.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialEntity.php b/src/PublicKeyCredentialEntity.php index 74f65b7..8e7533d 100644 --- a/src/PublicKeyCredentialEntity.php +++ b/src/PublicKeyCredentialEntity.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialLoader.php b/src/PublicKeyCredentialLoader.php index cd759c3..8fef7fe 100644 --- a/src/PublicKeyCredentialLoader.php +++ b/src/PublicKeyCredentialLoader.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialOptions.php b/src/PublicKeyCredentialOptions.php index 5a8e978..6d5e79d 100644 --- a/src/PublicKeyCredentialOptions.php +++ b/src/PublicKeyCredentialOptions.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialParameters.php b/src/PublicKeyCredentialParameters.php index e808d3c..9b42245 100644 --- a/src/PublicKeyCredentialParameters.php +++ b/src/PublicKeyCredentialParameters.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialRequestOptions.php b/src/PublicKeyCredentialRequestOptions.php index 58accef..f11d1c0 100644 --- a/src/PublicKeyCredentialRequestOptions.php +++ b/src/PublicKeyCredentialRequestOptions.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialRpEntity.php b/src/PublicKeyCredentialRpEntity.php index 94ebbc0..336ce51 100644 --- a/src/PublicKeyCredentialRpEntity.php +++ b/src/PublicKeyCredentialRpEntity.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialSource.php b/src/PublicKeyCredentialSource.php index 68f958d..8c8ad32 100644 --- a/src/PublicKeyCredentialSource.php +++ b/src/PublicKeyCredentialSource.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialSourceRepository.php b/src/PublicKeyCredentialSourceRepository.php index 34a122f..66a0734 100644 --- a/src/PublicKeyCredentialSourceRepository.php +++ b/src/PublicKeyCredentialSourceRepository.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/PublicKeyCredentialUserEntity.php b/src/PublicKeyCredentialUserEntity.php index b0446e2..cc3cdd4 100644 --- a/src/PublicKeyCredentialUserEntity.php +++ b/src/PublicKeyCredentialUserEntity.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/Server.php b/src/Server.php index 662c41a..b1c0dca 100644 --- a/src/Server.php +++ b/src/Server.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. @@ -215,18 +215,17 @@ public function generatePublicKeyCredentialCreationOptions(PublicKeyCredentialUs $extensions = $extensions ?? new AuthenticationExtensionsClientInputs(); $challenge = random_bytes($this->challengeSize); - return PublicKeyCredentialCreationOptions - ::create( + return PublicKeyCredentialCreationOptions::create( $this->rpEntity, $userEntity, $challenge, $publicKeyCredentialParametersList ) - ->excludeCredentials($excludedPublicKeyDescriptors) - ->setAuthenticatorSelection($criteria) - ->setAttestation($attestationMode ?? PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE) - ->setExtensions($extensions) - ->setTimeout($this->timeout) + ->excludeCredentials($excludedPublicKeyDescriptors) + ->setAuthenticatorSelection($criteria) + ->setAttestation($attestationMode ?? PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE) + ->setExtensions($extensions) + ->setTimeout($this->timeout) ; } @@ -235,13 +234,12 @@ public function generatePublicKeyCredentialCreationOptions(PublicKeyCredentialUs */ public function generatePublicKeyCredentialRequestOptions(?string $userVerification = null, array $allowedPublicKeyDescriptors = [], ?AuthenticationExtensionsClientInputs $extensions = null): PublicKeyCredentialRequestOptions { - return PublicKeyCredentialRequestOptions - ::create(random_bytes($this->challengeSize)) - ->setRpId($this->rpEntity->getId()) - ->setUserVerification($userVerification ?? PublicKeyCredentialRequestOptions::USER_VERIFICATION_REQUIREMENT_PREFERRED) - ->allowCredentials($allowedPublicKeyDescriptors) - ->setTimeout($this->timeout) - ->setExtensions($extensions ?? new AuthenticationExtensionsClientInputs()) + return PublicKeyCredentialRequestOptions::create(random_bytes($this->challengeSize)) + ->setRpId($this->rpEntity->getId()) + ->setUserVerification($userVerification ?? PublicKeyCredentialRequestOptions::USER_VERIFICATION_REQUIREMENT_PREFERRED) + ->allowCredentials($allowedPublicKeyDescriptors) + ->setTimeout($this->timeout) + ->setExtensions($extensions ?? new AuthenticationExtensionsClientInputs()) ; } diff --git a/src/StringStream.php b/src/StringStream.php index 8c9693c..b60acee 100644 --- a/src/StringStream.php +++ b/src/StringStream.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TokenBinding/IgnoreTokenBindingHandler.php b/src/TokenBinding/IgnoreTokenBindingHandler.php index 463686b..4272acf 100644 --- a/src/TokenBinding/IgnoreTokenBindingHandler.php +++ b/src/TokenBinding/IgnoreTokenBindingHandler.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TokenBinding/SecTokenBindingHandler.php b/src/TokenBinding/SecTokenBindingHandler.php index 223b6b9..7ddb2a9 100644 --- a/src/TokenBinding/SecTokenBindingHandler.php +++ b/src/TokenBinding/SecTokenBindingHandler.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TokenBinding/TokenBinding.php b/src/TokenBinding/TokenBinding.php index c6d2e9b..1a0adf7 100644 --- a/src/TokenBinding/TokenBinding.php +++ b/src/TokenBinding/TokenBinding.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TokenBinding/TokenBindingHandler.php b/src/TokenBinding/TokenBindingHandler.php index 53790c0..e81386a 100644 --- a/src/TokenBinding/TokenBindingHandler.php +++ b/src/TokenBinding/TokenBindingHandler.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TokenBinding/TokenBindingNotSupportedHandler.php b/src/TokenBinding/TokenBindingNotSupportedHandler.php index 4ef4b9e..98c483e 100644 --- a/src/TokenBinding/TokenBindingNotSupportedHandler.php +++ b/src/TokenBinding/TokenBindingNotSupportedHandler.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TrustPath/CertificateTrustPath.php b/src/TrustPath/CertificateTrustPath.php index 47ea381..b2916ae 100644 --- a/src/TrustPath/CertificateTrustPath.php +++ b/src/TrustPath/CertificateTrustPath.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TrustPath/EcdaaKeyIdTrustPath.php b/src/TrustPath/EcdaaKeyIdTrustPath.php index 73d4fa4..0a57556 100644 --- a/src/TrustPath/EcdaaKeyIdTrustPath.php +++ b/src/TrustPath/EcdaaKeyIdTrustPath.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TrustPath/EmptyTrustPath.php b/src/TrustPath/EmptyTrustPath.php index 61fd32b..518ab0b 100644 --- a/src/TrustPath/EmptyTrustPath.php +++ b/src/TrustPath/EmptyTrustPath.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TrustPath/TrustPath.php b/src/TrustPath/TrustPath.php index ce5b054..f83cfd9 100644 --- a/src/TrustPath/TrustPath.php +++ b/src/TrustPath/TrustPath.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/TrustPath/TrustPathLoader.php b/src/TrustPath/TrustPathLoader.php index f60333c..5153ac1 100644 --- a/src/TrustPath/TrustPathLoader.php +++ b/src/TrustPath/TrustPathLoader.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. diff --git a/src/Util/CoseSignatureFixer.php b/src/Util/CoseSignatureFixer.php index ea3d12c..3a01fba 100644 --- a/src/Util/CoseSignatureFixer.php +++ b/src/Util/CoseSignatureFixer.php @@ -5,7 +5,7 @@ /* * The MIT License (MIT) * - * Copyright (c) 2014-2020 Spomky-Labs + * Copyright (c) 2014-2021 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details.