You are here

public function Oauth2ClientPluginBase::getClientSecret in OAuth2 Client 8.3

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

Retrieves the client_secret of the OAuth2 server.

Return value

string The client_secret of the OAuth2 server.

Overrides Oauth2ClientPluginInterface::getClientSecret

File

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

Class

Oauth2ClientPluginBase
Base class for Oauth2Client plugins.

Namespace

Drupal\oauth2_client\Plugin\Oauth2Client

Code

public function getClientSecret() {
  $credentials = $this
    ->retrieveCredentials();
  if (empty($credentials['client_secret'])) {
    throw new Oauth2ClientPluginMissingKeyException('client_secret');
  }
  return $credentials['client_secret'];
}