Skip to content

Commit

Permalink
Fixed missing import in salesforce rest client
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthrailkill committed May 3, 2021
1 parent 4063102 commit bdc003c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Rest/OAuthRestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ public function patchJson(
);
}

public function refreshToken(): OAuthAccessToken
public function refreshToken(): ?OAuthAccessToken
{
$refreshToken = $this->oAuthAccessToken->getRefreshToken();
$refreshedToken = $this->getRefreshToken($refreshToken);
$this->oAuthAccessToken = $refreshedToken;
return $refreshedToken;
}


private function setParamsFromAccessToken(): void
{
$this->apiRestClient->setBaseUriForRestClient($this->getOAuthAccessToken()->getInstanceUrl());
Expand Down
2 changes: 1 addition & 1 deletion src/Rest/RestClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ public function patchJson(
?float $timeoutSeconds = null
): ResponseInterface;

public function refreshToken(): OAuthAccessToken;
public function refreshToken(): ?OAuthAccessToken;
}
5 changes: 5 additions & 0 deletions src/Rest/SalesforceRestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,9 @@ private function constructUrl(string $endpoint): string

return '/services/data/' . $this->apiVersion . '/' . $endpoint;
}

public function refreshToken(): ?OAuthAccessToken
{
return null;
}
}

0 comments on commit bdc003c

Please sign in to comment.