You are here

public function SalesforceAuthProviderPluginBase::__construct in Salesforce Suite 8.3

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

SalesforceOAuthPlugin constructor.

Parameters

array $configuration: Plugin configuration.

string $plugin_id: Plugin id.

mixed $plugin_definition: Plugin definition.

\OAuth\Common\Http\Client\ClientInterface $httpClient: The oauth http client.

\Drupal\salesforce\Storage\SalesforceAuthTokenStorageInterface $storage: Auth token storage service.

Throws

\OAuth\OAuth2\Service\Exception\InvalidScopeException Comment.

1 method overrides SalesforceAuthProviderPluginBase::__construct()
TestSalesforceAuthProvider::__construct in src/Tests/TestSalesforceAuthProvider.php
@inheritDoc

File

src/SalesforceAuthProviderPluginBase.php, line 84

Class

SalesforceAuthProviderPluginBase
Shared methods for auth providers.

Namespace

Drupal\salesforce

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ClientInterface $httpClient, SalesforceAuthTokenStorageInterface $storage) {
  $this->id = !empty($configuration['id']) ? $configuration['id'] : NULL;
  $this->configuration = $configuration;
  $this->pluginDefinition = $plugin_definition;
  $this->pluginId = $plugin_id;
  $this->credentials = $this
    ->getCredentials();
  parent::__construct($this
    ->getCredentials(), $httpClient, $storage, [], new Uri($this
    ->getCredentials()
    ->getLoginUrl()));
}