From 75160b12821f7f4299cce7f0b69c83c1502ae071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 27 May 2024 13:08:29 +0200 Subject: 2024-02-19 upstream --- vendor/web-token/jwt-key-mgmt/JKUFactory.php | 100 +++++++++++++-------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'vendor/web-token/jwt-key-mgmt/JKUFactory.php') diff --git a/vendor/web-token/jwt-key-mgmt/JKUFactory.php b/vendor/web-token/jwt-key-mgmt/JKUFactory.php index 16d24bc..8997ed9 100644 --- a/vendor/web-token/jwt-key-mgmt/JKUFactory.php +++ b/vendor/web-token/jwt-key-mgmt/JKUFactory.php @@ -1,50 +1,50 @@ -jsonConverter = $jsonConverter ?? new \Jose\Component\Core\Util\JsonConverter(); - } - - /** - * This method will try to fetch the url a retrieve the key set. - * Throws an exception in case of failure. - * - * @throws \InvalidArgumentException - */ - public function loadFromUrl(string $url, array $header = []): JWKSet - { - $content = $this->getContent($url, $header); - $data = $this->jsonConverter->decode($content); - if (!\is_array($data)) { - throw new \RuntimeException('Invalid content.'); - } - - return JWKSet::createFromKeyData($data); - } -} +jsonConverter = $jsonConverter ?? new \Jose\Component\Core\Util\JsonConverter(); + } + + /** + * This method will try to fetch the url a retrieve the key set. + * Throws an exception in case of failure. + * + * @throws \InvalidArgumentException + */ + public function loadFromUrl(string $url, array $header = []): JWKSet + { + $content = $this->getContent($url, $header); + $data = $this->jsonConverter->decode($content); + if (!\is_array($data)) { + throw new \RuntimeException('Invalid content.'); + } + + return JWKSet::createFromKeyData($data); + } +} -- cgit v1.2.3