You are here

public function RestClient::setRefreshToken in Salesforce Suite 8.3

Same name in this branch
  1. 8.3 src/Rest/RestClient.php \Drupal\salesforce\Rest\RestClient::setRefreshToken()
  2. 8.3 modules/salesforce_encrypt/src/Rest/RestClient.php \Drupal\salesforce_encrypt\Rest\RestClient::setRefreshToken()

Set the refresh token.

Parameters

string $token: Refresh token from Salesforce.

Overrides RestClientInterface::setRefreshToken

Deprecated

in 8.x-4.0 and does not have an exact analog, refer to \Drupal\salesforce\SalesforceAuthProviderInterface instead.

2 calls to RestClient::setRefreshToken()
RestClient::handleAuthResponse in src/Rest/RestClient.php
Helper callback for OAuth handshake, and refreshToken()
RestClient::setRefreshToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Set the refresh token.
1 method overrides RestClient::setRefreshToken()
RestClient::setRefreshToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Set the refresh token.

File

src/Rest/RestClient.php, line 479

Class

RestClient
Objects, properties, and methods to communicate with the Salesforce REST API.

Namespace

Drupal\salesforce\Rest

Code

public function setRefreshToken($token) {
  $this->state
    ->set('salesforce.refresh_token', $token);
  $this
    ->storage()
    ->updateToken();
  return $this;
}