From 555ae505030418666f3261a9e8ee4926bdf439e0 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 22 Aug 2022 12:52:13 -0700 Subject: [PATCH 1/2] fix: casing of GET for PSR compat --- src/CachedKeySet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CachedKeySet.php b/src/CachedKeySet.php index e2215b30..87f470d7 100644 --- a/src/CachedKeySet.php +++ b/src/CachedKeySet.php @@ -146,7 +146,7 @@ private function keyIdExists(string $keyId): bool if ($this->rateLimitExceeded()) { return false; } - $request = $this->httpFactory->createRequest('get', $this->jwksUri); + $request = $this->httpFactory->createRequest('GET', $this->jwksUri); $jwksResponse = $this->httpClient->sendRequest($request); $jwks = (string) $jwksResponse->getBody(); $this->keySet = JWK::parseKeySet(json_decode($jwks, true), $this->defaultAlg); From fc6719a9ecf57ee753d68acb475c23d194d02817 Mon Sep 17 00:00:00 2001 From: Brent Shaffer Date: Mon, 22 Aug 2022 15:41:30 -0700 Subject: [PATCH 2/2] fix test --- tests/CachedKeySetTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CachedKeySetTest.php b/tests/CachedKeySetTest.php index 1dc2fdc0..73b1213d 100644 --- a/tests/CachedKeySetTest.php +++ b/tests/CachedKeySetTest.php @@ -325,7 +325,7 @@ private function getMockHttpFactory(int $timesCalled = 1) { $request = $this->prophesize('Psr\Http\Message\RequestInterface'); $factory = $this->prophesize(RequestFactoryInterface::class); - $factory->createRequest('get', $this->testJwksUri) + $factory->createRequest('GET', $this->testJwksUri) ->shouldBeCalledTimes($timesCalled) ->willReturn($request->reveal());