Skip to content

Commit

Permalink
Merge pull request #28 from eventfarm/feature/add-public-functionalit…
Browse files Browse the repository at this point in the history
…y-to-restforce-to-refresh-the-user-token

Fixed minor errors with refresh token
  • Loading branch information
kevinthrailkill authored May 4, 2021
2 parents 72612b5 + 7ffd715 commit 918d8d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Rest/GuzzleRestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,9 @@ private function containsTrailingSlash(string $baseUri): bool
{
return substr($baseUri, -1) === '/';
}

public function refreshToken(): ?OAuthAccessToken
{
return null;
}
}
2 changes: 1 addition & 1 deletion src/Restforce.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function query(string $queryString): ResponseInterface
]);
}

public function refreshToken(): OAuthAccessToken
public function refreshToken(): ?OAuthAccessToken
{
return $this->getOAuthRestClient()->refreshToken();
}
Expand Down
2 changes: 1 addition & 1 deletion src/RestforceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ public function update(string $sobjectType, string $sobjectId, array $data): Res
public function describe(string $sobjectType): ResponseInterface;
public function find(string $sobjectType, string $sobjectId, array $fields = []): ResponseInterface;
public function getNext(string $url): ResponseInterface;
public function refreshToken(): OAuthAccessToken;
public function refreshToken(): ?OAuthAccessToken;
}

0 comments on commit 918d8d2

Please sign in to comment.