diff --git a/src/Microsoft/Provider.php b/src/Microsoft/Provider.php index 8e9e9ba27..82cd03846 100644 --- a/src/Microsoft/Provider.php +++ b/src/Microsoft/Provider.php @@ -283,8 +283,10 @@ protected function parseIdToken($body) */ private function getJWTKeys(): array { - $response = $this->getHttpClient()->get($this->getOpenIdConfiguration()->jwks_uri); - + $response = $this->getHttpClient()->get($this->getOpenIdConfiguration()->jwks_uri, [ + RequestOptions::PROXY => $this->getConfig('proxy'), + ]); + return json_decode((string) $response->getBody(), true); } @@ -304,7 +306,7 @@ private function getOpenIdConfiguration(): mixed // $discovery = sprintf('https://login.microsoftonline.com/%s/v2.0/.well-known/openid-configuration', $this->getConfig('tenant', 'common')); - $response = $this->getHttpClient()->get($discovery); + $response = $this->getHttpClient()->get($discovery, [RequestOptions::PROXY => $this->getConfig('proxy')]); } catch (Exception $ex) { throw new InvalidStateException("Error on getting OpenID Configuration. {$ex}"); }