You are here

public function RestClient::getAccessToken in Salesforce Suite 8.3

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

Get the access token.

Return value

string|null The access token.

Overrides RestClientInterface::getAccessToken

Deprecated

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

5 calls to RestClient::getAccessToken()
RestClient::apiCall in src/Rest/RestClient.php
Make a call to the Salesforce REST API.
RestClient::apiHttpRequest in src/Rest/RestClient.php
Private helper to issue an SF API request.
RestClient::getAccessToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Get the access token.
RestClient::httpRequestRaw in src/Rest/RestClient.php
Return raw response content from given URL.
RestClient::initializeIdentity in src/Rest/RestClient.php
Retrieve and store the Salesforce identity given an ID url.
1 method overrides RestClient::getAccessToken()
RestClient::getAccessToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Get the access token.

File

src/Rest/RestClient.php, line 455

Class

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

Namespace

Drupal\salesforce\Rest

Code

public function getAccessToken() {
  $access_token = $this->state
    ->get('salesforce.access_token');
  return isset($access_token) && mb_strlen($access_token) !== 0 ? $access_token : FALSE;
}