Skip to content

Commit

Permalink
Merge branch '3.x' into issue_325
Browse files Browse the repository at this point in the history
  • Loading branch information
shishir-intelli authored Nov 29, 2023
2 parents ce45c84 + a34f592 commit 9eb0285
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
namespace Apigee\Edge;

use Apigee\Edge\HttpClient\Utility\JournalInterface;
use Http\Message\UriFactory;
use Psr\Http\Client\ClientInterface as HttpClient;
use Psr\Http\Message\ResponseInterface;

Expand Down Expand Up @@ -75,8 +74,12 @@ public function getJournal(): JournalInterface;

/**
* Returns the URI factory used by the Client.
*
* @return \Http\Message\UriFactory|\Psr\Http\Message\UriFactoryInterface
*
* @todo Restore native return type as \Psr\Http\Message\UriFactoryInterface in 4.0.0.
*/
public function getUriFactory(): UriFactory;
public function getUriFactory();

/**
* Returns the version of the API client.
Expand Down
5 changes: 2 additions & 3 deletions src/HttpClient/Plugin/RetryOauthAuthenticationPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

use Apigee\Edge\Exception\OauthAccessTokenAuthenticationException;
use Apigee\Edge\HttpClient\Plugin\Authentication\AbstractOauth;
use Exception;
use Http\Client\Common\Plugin;
use Http\Client\Exception;
use Http\Promise\Promise;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
Expand Down Expand Up @@ -62,9 +62,8 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
// Mark access token as expired and with that ensure that the authentication plugin gets a new
// access token.
$this->auth->getTokenStorage()->markExpired();
$promise = $first($request);

return $promise->wait();
return $first($request)->wait();
}

throw $exception;
Expand Down

0 comments on commit 9eb0285

Please sign in to comment.