You are here

public function Oauth2ClientPluginBase::getScopes in OAuth2 Client 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/Oauth2Client/Oauth2ClientPluginBase.php \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginBase::getScopes()

Get the set of scopes for the provider to use by default.

Return value

array|string|null The list of scopes for the provider to use.

Overrides Oauth2ClientPluginInterface::getScopes

File

src/Plugin/Oauth2Client/Oauth2ClientPluginBase.php, line 141

Class

Oauth2ClientPluginBase
Base class for Oauth2Client plugins.

Namespace

Drupal\oauth2_client\Plugin\Oauth2Client

Code

public function getScopes() {
  if (!isset($this->pluginDefinition['scopes'])) {
    return [];
  }
  return $this->pluginDefinition['scopes'] ?: [];
}