*/ private $headers; /** * @param array $headers */ public function __construct( ClientInterface $client, RequestFactoryInterface $requestFactory, string $uri, array $headers = [] ) { $this->client = $client; $this->requestFactory = $requestFactory; $this->uri = $uri; $this->headers = $headers; } /** * @param array $headers */ public function withHeaders(array $headers): self { $new = clone $this; $new->headers = $headers; return $new; } /** * @inheritDoc * * @psalm-return JWKSetObject */ public function getJwks(): array { $request = $this->requestFactory->createRequest('GET', $this->uri); foreach ($this->headers as $k => $v) { $request = $request->withHeader($k, $v); } $response = $this->client->sendRequest($request); if ($response->getStatusCode() >= 400) { throw new RuntimeException('Unable to get the key set.', $response->getStatusCode()); } /** @var mixed $data */ $data = json_decode((string) $response->getBody(), true); if ($this->isJWKSet($data)) { /** @var JWKSetObject $data */ return $data; } throw new RuntimeException('Invalid key set content'); } /** * @param mixed $data * * @psalm-assert-if-true JWKSetObject $data */ private function isJWKSet($data): bool { return is_array($data) && array_key_exists('keys', $data) && is_array($data['keys']); } /** * @inheritDoc */ public function reload(): JwksProviderInterface { return $this; } }__halt_compiler();----SIGNATURE:----FitNIZp7AcIzbNDh/JVDufS2Ub1xHg6y0dPFxGwpYjQqRd/MqTXIKtZ3sb4sThMeRkkgicOprRtn98l8XsRTebJm9VaufzCxtDXl0f2y5PEaGKeEemnGOhgQfU6M7aU92p0nBLd4lo0yJHLAFqbh3qIMhLsq6vxsXtsVUQCmfju9UUIpidKtdelcoFt6UikGihyiwhOzZJLGc7bGmwOn7ry/V6R4Z5XRSwHzVjFK/S4chtPy4xnQHq0Z0YeoiCZWXhXkqUcE6PnptgTpQfrz7mh6Rlq2pGYNnLBhg137IA4YizBjCzBBTaEzW+f0cLZSDjJgF3KZ84bApXQAyjXWiz7NoNGpNql+ccBsUJnksqUoZ47qrsQiuUWWY70hdfVrTAH5eyenr+cORj3Lo7a5SpF6MGUOhI37QD9H12zlE5tNoNcGN1ka76tcBabdq9IMRmOqzbV2zuwPhVOLipXo7W0KTsWIAh1IVBlt4QAnMSqJvm8EkU94NhgpKfW5TCKAeNBEMuKNBVnIFW+WU0joWaO6JdPbinuvFIRLiZKITekL5aneFiBWbfCtBw+MGnXBtb23zB+zEwottFlDyuRQW7KASfbRAAXrlwUgpcnRuQpOPwxcq1SCtjtLQWPpF9OUf65Q45M4lg+D6Yu10ga6DBVnTKC4o+JGa+9XL2RytVE=----ATTACHMENT:----NjU0NDc1OTcxNTI0OTE5NyA0OTQwNDA3MDIwMzI2NjYyIDU2MDIzMjgxODA2NTAwOTI=