You are here

public function SalesforceAuthTokenStorage::retrieveIdentity in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 src/Storage/SalesforceAuthTokenStorage.php \Drupal\salesforce\Storage\SalesforceAuthTokenStorage::retrieveIdentity()
  2. 8.3 src/Storage/SalesforceAuthTokenStorage.php \Drupal\salesforce\Storage\SalesforceAuthTokenStorage::retrieveIdentity()

Identity for the given service.

Return value

\Drupal\salesforce\Rest\SalesforceIdentityInterface Identity.

Overrides SalesforceAuthTokenStorageInterface::retrieveIdentity

1 call to SalesforceAuthTokenStorage::retrieveIdentity()
SalesforceAuthTokenStorage::hasIdentity in src/Storage/SalesforceAuthTokenStorage.php
Return boolean indicating whether this service has an identity.

File

src/Storage/SalesforceAuthTokenStorage.php, line 177

Class

SalesforceAuthTokenStorage
Salesforce auth token storage.

Namespace

Drupal\salesforce\Storage

Code

public function retrieveIdentity($service) {

  // Backwards compatibility in case someone missed the hook_update.
  $identity = $this->state
    ->get(static::getIdentityStorageId($service));
  if (is_array($identity)) {
    $identity = SalesforceIdentity::create($identity);
  }
  return $identity;
}