SalesforceCredentials.php in Salesforce Suite 8.3
File
src/Consumer/SalesforceCredentials.php
View source
<?php
namespace Drupal\salesforce\Consumer;
use OAuth\Common\Consumer\Credentials;
class SalesforceCredentials extends Credentials implements SalesforceCredentialsInterface {
protected $loginUrl;
protected $consumerKey;
public function getConsumerKey() {
return $this->consumerKey;
}
public function getLoginUrl() {
return $this->loginUrl;
}
public function getCallbackUrl() {
return Url::fromRoute('salesforce.oauth_callback', [], [
'absolute' => TRUE,
'https' => TRUE,
])
->toString();
}
public function isValid() {
return FALSE;
}
public static function create(array $configuration) {
return new static($configuration['consumer_key'], $configuration['consumer_secret'], NULL);
}
}