You are here

public function SalesforceAuthProviderPluginBase::getCredentials in Salesforce Suite 8.4

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

Return the credentials configured for this auth provider instance.

Credentials contain consumer key, login url, secret, etc.

Return value

\Drupal\salesforce\Consumer\SalesforceCredentialsInterface The credentials.

Overrides SalesforceAuthProviderInterface::getCredentials

2 calls to SalesforceAuthProviderPluginBase::getCredentials()
SalesforceAuthProviderPluginBase::__construct in src/SalesforceAuthProviderPluginBase.php
SalesforceOAuthPlugin constructor.
SalesforceJWTPlugin::generateAssertionClaim in modules/salesforce_jwt/src/Plugin/SalesforceAuthProvider/SalesforceJWTPlugin.php
Returns a JSON encoded JWT Claim.
1 method overrides SalesforceAuthProviderPluginBase::getCredentials()
Broken::getCredentials in src/Plugin/SalesforceAuthProvider/Broken.php
Return the credentials configured for this auth provider instance.

File

src/SalesforceAuthProviderPluginBase.php, line 236

Class

SalesforceAuthProviderPluginBase
Shared methods for auth providers.

Namespace

Drupal\salesforce

Code

public function getCredentials() {
  if (empty($this->credentials) || !$this->credentials
    ->isValid()) {
    $pluginDefinition = $this
      ->getPluginDefinition();
    $this->credentials = $pluginDefinition['credentials_class']::create($this->configuration);
  }
  return $this->credentials;
}