Browse Source

Fix issue with refreshing tokens

master
Adam Pippin 3 years ago
parent
commit
ab74c63ae2
  1. 2
      src/Oidc/Authentication/TokenAuthentication.php
  2. 2
      src/Oidc/Flows/ServiceAccountFlow.php

2
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());
}

2
src/Oidc/Flows/ServiceAccountFlow.php

@ -35,6 +35,6 @@ class ServiceAccountFlow
*/
public function getServiceAccountToken(): Token
{
return $this->client->createTokenFromClient();
$token = $this->client->createTokenFromClient();
}
}

Loading…
Cancel
Save