You are here

protected function OauthAuthentication::authClient in Apigee Edge 8

File

src/OauthAuthentication.php, line 37

Class

OauthAuthentication
Decorator for OAuth authentication plugin.

Namespace

Drupal\apigee_edge

Code

protected function authClient() : ClientInterface {

  /** @var \Drupal\apigee_edge\SDKConnectorInterface $sdk_connector */
  $sdk_connector = \Drupal::service('apigee_edge.sdk_connector');
  return $sdk_connector
    ->buildClient(new BasicAuth($this->clientId, $this->clientSecret), $this
    ->getAuthServer());
}