You are here

public function SalesforceAuthProviderPluginBase::getIdentity in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/SalesforceAuthProviderPluginBase.php \Drupal\salesforce\SalesforceAuthProviderPluginBase::getIdentity()
  2. 5.0.x src/SalesforceAuthProviderPluginBase.php \Drupal\salesforce\SalesforceAuthProviderPluginBase::getIdentity()

Identify for this connection.

Return value

\Drupal\salesforce\Rest\SalesforceIdentityInterface Identity for this connection.

Throws

\Drupal\salesforce\IdentityNotFoundException If there is no identity.

Overrides SalesforceAuthProviderInterface::getIdentity

1 call to SalesforceAuthProviderPluginBase::getIdentity()
SalesforceAuthProviderPluginBase::getApiEndpoint in src/SalesforceAuthProviderPluginBase.php
API Url for this plugin.

File

src/SalesforceAuthProviderPluginBase.php, line 311

Class

SalesforceAuthProviderPluginBase
Shared methods for auth providers.

Namespace

Drupal\salesforce

Code

public function getIdentity() {
  $identity = $this->storage
    ->retrieveIdentity($this
    ->id());
  if (empty($identity)) {
    throw new IdentityNotFoundException();
  }
  return $identity;
}