Skip to content

Commit 518ce37

Browse files
committed
feat: expire the introspection token in cache before it expires
1 parent 1b04342 commit 518ce37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/IntrospectClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function getNewAccessToken(): string
5252
if (isset($result['access_token'])) {
5353
$accessToken = $result['access_token'];
5454

55-
$this->cache->add($this->accessTokenCacheKey, $accessToken, intVal($result['expires_in']) / 60);
55+
$this->cache->add($this->accessTokenCacheKey, $accessToken, (intVal($result['expires_in']) / 60) - 5);
5656

5757
return $accessToken;
5858
}

0 commit comments

Comments
 (0)