diff --git a/module/fid/src/Service/Client.php b/module/fid/src/Service/Client.php index 7bdb8eca18fe3c75f94a8479c1d673be48b7f754..9211f4e79a849affb6d3a73c63a689cbeaff194a 100644 --- a/module/fid/src/Service/Client.php +++ b/module/fid/src/Service/Client.php @@ -381,12 +381,12 @@ class Client RequestInterface $request, bool $retryOn401 = true ): ResponseInterface { - $token = $this->restoreLogon()->getToken(); + $token = ($logon = $this->restoreLogon())->getToken(); $request = $request->withHeader('Authorization', "Bearer $token"); $response = $this->sendRequest($request); if ($response->getStatusCode() === 401 && $retryOn401) { - $this->refreshLogon(); + $this->refreshLogon($logon); return $this->sendAuthenticatedRequest($request, false); }