diff --git a/src/Oidc/Authentication/TokenAuthentication.php b/src/Oidc/Authentication/TokenAuthentication.php index cdc4cbb..ac689a0 100644 --- a/src/Oidc/Authentication/TokenAuthentication.php +++ b/src/Oidc/Authentication/TokenAuthentication.php @@ -60,7 +60,7 @@ class TokenAuthentication extends Authentication if ($this->token->isExpired() && isset($this->refresh_callback)) { $callback = $this->refresh_callback; - $this->token = $callback($this); + $this->token = $callback($this->token); } return $request->withHeader('Authorization', 'Bearer '.$this->token->getAccessToken()); } diff --git a/src/Oidc/Flows/ServiceAccountFlow.php b/src/Oidc/Flows/ServiceAccountFlow.php index fdeab19..48b3dc7 100644 --- a/src/Oidc/Flows/ServiceAccountFlow.php +++ b/src/Oidc/Flows/ServiceAccountFlow.php @@ -35,6 +35,6 @@ class ServiceAccountFlow */ public function getServiceAccountToken(): Token { - return $this->client->createTokenFromClient(); + $token = $this->client->createTokenFromClient(); } }