Skip to content

Commit

Permalink
Use beste/in-memory-cache instead of the cache implementation provi…
Browse files Browse the repository at this point in the history
…ded by `google/auth`
  • Loading branch information
jeromegamez committed Dec 9, 2023
1 parent c3b30b9 commit cc40e61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"beste/clock": "^3.0",
"beste/in-memory-cache": "^1.0",
"beste/json": "^1.2.1",
"fig/http-message-util": "^1.1.5",
"firebase/php-jwt": "^6.3.2",
Expand Down
8 changes: 4 additions & 4 deletions src/Firebase/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace Kreait\Firebase;

use Beste\Cache\InMemoryCache;
use Beste\Clock\SystemClock;
use Beste\Clock\WrappingClock;
use Beste\Json;
use Firebase\JWT\CachedKeySet;
use Google\Auth\ApplicationDefaultCredentials;
use Google\Auth\Cache\MemoryCacheItemPool;
use Google\Auth\Credentials\ServiceAccountCredentials;
use Google\Auth\FetchAuthTokenCache;
use Google\Auth\FetchAuthTokenInterface;
Expand Down Expand Up @@ -130,9 +130,9 @@ public function __construct()
{
$this->clock = SystemClock::create();
$this->httpFactory = new HttpFactory();
$this->verifierCache = new MemoryCacheItemPool();
$this->authTokenCache = new MemoryCacheItemPool();
$this->keySetCache = new MemoryCacheItemPool();
$this->verifierCache = new InMemoryCache($this->clock);
$this->authTokenCache = new InMemoryCache($this->clock);
$this->keySetCache = new InMemoryCache($this->clock);
$this->httpClientOptions = HttpClientOptions::default();

$googleApplicationCredentials = Util::getenv('GOOGLE_APPLICATION_CREDENTIALS');
Expand Down

0 comments on commit cc40e61

Please sign in to comment.