From ea745ad5d4336bef238bda842c4744c34ea4ed26 Mon Sep 17 00:00:00 2001 From: Colin Sheaff Date: Tue, 20 Feb 2024 11:04:52 -0600 Subject: [PATCH 1/2] Fix for jwks() in ProviderController --- src/ProviderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ProviderController.php b/src/ProviderController.php index c830571..f867074 100644 --- a/src/ProviderController.php +++ b/src/ProviderController.php @@ -85,7 +85,7 @@ public function jwks(ProviderRepository $providerRepository) // ]; } else { - $pkey = openssl_pkey_get_details(openssl_pkey_get_public($crypt->getKeyPath())); + $pkey = openssl_pkey_get_details(openssl_pkey_get_public($crypt->getKeyContents())); } $result['n'] = $this->base64WebSafe($pkey['rsa']['n']); From cb36dceeb55da90994a1b4dd1606056d82a7dd86 Mon Sep 17 00:00:00 2001 From: Colin Sheaff Date: Tue, 20 Feb 2024 11:05:18 -0600 Subject: [PATCH 2/2] use key contents, not path, in tests --- tests/UserinfoControllerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/UserinfoControllerTest.php b/tests/UserinfoControllerTest.php index a35982b..af22448 100644 --- a/tests/UserinfoControllerTest.php +++ b/tests/UserinfoControllerTest.php @@ -92,8 +92,8 @@ public function testUserinfoBasic() $config = Configuration::forAsymmetricSigner( new Sha256(), - InMemory::file($keyRepository->getPrivateKey()->getKeyPath()), - InMemory::file($keyRepository->getPrivateKey()->getKeyPath()) + InMemory::plainText($keyRepository->getPrivateKey()->getKeyContents()), + InMemory::plainText($keyRepository->getPrivateKey()->getKeyContents()) ); $token = $config->builder()