Skip to content

Commit

Permalink
Bugs (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Spomky authored Nov 21, 2021
1 parent c72ad01 commit 8761be6
Show file tree
Hide file tree
Showing 61 changed files with 81 additions and 84 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AttestationStatement/AttestationObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AttestationStatement/AttestationObjectLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AttestationStatement/AttestationStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AttestationStatement/AttestationStatementSupport.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AttestedCredentialData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticationExtensions/AuthenticationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticationExtensions/ExtensionOutputChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticationExtensions/ExtensionOutputError.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorAssertionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorAssertionResponseValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorAttestationResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorAttestationResponseValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticatorSelectionCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/CertificateChainChecker/CertificateChainChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/CertificateToolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/CollectedClientData.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Counter/CounterChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Counter/ThrowExceptionIfInvalid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Credential.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKeyCredential.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 7 additions & 8 deletions src/PublicKeyCredentialCreationOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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())
;
}

Expand Down
2 changes: 1 addition & 1 deletion src/PublicKeyCredentialDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKeyCredentialDescriptorCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading

0 comments on commit 8761be6

Please sign in to comment.