diff --git a/README.md b/README.md index 30b429493ad323f83686e919e48413a8491f8310..d560c1a4c1a1cd96a6e3029c78e1e24120268866 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ You can add our library to your repository as a submodule or install it using Co To install our repository with Composer, run this command in Terminal: -`composer require privacyidea/privacyidea-php-sdk` +`composer require privacyidea/privacyidea-php-client` Next, you have to run: diff --git a/composer.json b/composer.json index eae14d615977b1639067193ec0ec4c2625c093a9..ed7165af72c3f45d6aadd43e48b8dc18be7a42dd 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { - "name": "privacyidea/privacyidea-php-sdk", - "description": "This is the privacyIDEA-PHP-SDK. The library that will help you to connect your plugin to the privacyIDEA server using REST APIs.", + "name": "privacyidea/privacyidea-php-client", + "description": "This is the privacyIDEA-PHP-Client. The library that will help you to connect your plugin to the privacyIDEA server using REST APIs.", "minimum-stability": "stable", "authors": [ { @@ -11,7 +11,7 @@ "repositories": [ { "type": "vcs", - "url": "https://github.com/privacyidea/sdk-php" + "url": "https://github.com/privacyidea/sdk-client" } ], "require": { diff --git a/src/PIResponse.php b/src/PIResponse.php index 573e00b995d14854e0d9183ee56d2a14b0adc400..93da7988a56a85275d327401fe8ebab6ea8a63d4 100644 --- a/src/PIResponse.php +++ b/src/PIResponse.php @@ -184,16 +184,23 @@ class PIResponse */ public function webAuthnSignRequest() { - $ret = ""; + $arr = []; + $webauthn = ""; foreach ($this->multiChallenge as $challenge) { if ($challenge->type === "webauthn") { - $ret = $challenge->webAuthnSignRequest; - break; + $t = json_decode($challenge->webAuthnSignRequest); + if (empty($webauthn)) + { + $webauthn = $t; + } + $arr[] = $challenge->attributes['webAuthnSignRequest']['allowCredentials'][0]; } } - return $ret; + $webauthn->allowCredentials = $arr; + + return json_encode($webauthn); } public function u2fSignRequest() diff --git a/test/privacyidea-php-sdk/TestEnrollToken.php b/test/privacyidea-php-client/TestEnrollToken.php similarity index 100% rename from test/privacyidea-php-sdk/TestEnrollToken.php rename to test/privacyidea-php-client/TestEnrollToken.php diff --git a/test/privacyidea-php-sdk/TestGetAuthToken.php b/test/privacyidea-php-client/TestGetAuthToken.php similarity index 100% rename from test/privacyidea-php-sdk/TestGetAuthToken.php rename to test/privacyidea-php-client/TestGetAuthToken.php diff --git a/test/privacyidea-php-sdk/TestPollTransaction.php b/test/privacyidea-php-client/TestPollTransaction.php similarity index 100% rename from test/privacyidea-php-sdk/TestPollTransaction.php rename to test/privacyidea-php-client/TestPollTransaction.php diff --git a/test/privacyidea-php-sdk/TestTriggerChallenge.php b/test/privacyidea-php-client/TestTriggerChallenge.php similarity index 100% rename from test/privacyidea-php-sdk/TestTriggerChallenge.php rename to test/privacyidea-php-client/TestTriggerChallenge.php diff --git a/test/privacyidea-php-sdk/TestValidateCheck.php b/test/privacyidea-php-client/TestValidateCheck.php similarity index 98% rename from test/privacyidea-php-sdk/TestValidateCheck.php rename to test/privacyidea-php-client/TestValidateCheck.php index 3c6d2fc6e9cfebc5f0844acd432b77a55010fc3e..479d0977861df7b4f4eb860def79da8c26fa6a37 100644 --- a/test/privacyidea-php-sdk/TestValidateCheck.php +++ b/test/privacyidea-php-client/TestValidateCheck.php @@ -1,6 +1,6 @@ <?php -require_once('../../src/privacyidea-php-sdk/SDK-Autoloader.php'); +require_once('../../src/privacyidea-php-client/SDK-Autoloader.php'); require_once('../../vendor/autoload.php'); use PHPUnit\Framework\TestCase;