OAuth2Manager.php in Social Auth 8.2
File
src/AuthManager/OAuth2Manager.php
View source
<?php
namespace Drupal\social_auth\AuthManager;
use Drupal\social_api\AuthManager\OAuth2Manager as BaseOAuth2Manager;
abstract class OAuth2Manager extends BaseOAuth2Manager implements OAuth2ManagerInterface {
protected $scopes;
protected $endPoints;
protected $user;
public function getExtraDetails($method = 'GET', $domain = NULL) {
$endpoints = $this
->getEndPoints();
$data = [];
if ($endpoints) {
foreach (explode(PHP_EOL, $endpoints) as $endpoint) {
$parts = explode('|', $endpoint);
$data[$parts[1]] = $this
->requestEndPoint($method, $parts[0], $domain);
}
return $data;
}
return NULL;
}
public function getScopes() {
if ($this->scopes === NULL) {
$this->scopes = $this->settings
->get('scopes');
}
return $this->scopes;
}
public function getEndPoints() {
if ($this->endPoints === NULL) {
$this->endPoints = $this->settings
->get('endpoints');
}
return $this->endPoints;
}
}