src/Client/Api.php
private function setupOAuth2Plugin()
	{
		$oauth2AuthorizationClient = $this->resolveClient(null);
		$oauth2AuthorizationClient->setBaseUrl(Properties::authorizationUrl());

		$clientCredentials = new ClientCredentials($oauth2AuthorizationClient, $this->config->toArray());
		$oauth2Plugin = new OAuth2Plugin($clientCredentials);
		$oauth2Plugin->setCache($this->config->getAccessTokenCacheFile());

		$this->client->addSubscriber($oauth2Plugin);
	}
private function setupOAuth2Plugin()
	{
		$oauth2AuthorizationClient = $this->resolveClient(null);
		$oauth2AuthorizationClient->setBaseUrl(Properties::authorizationUrl());

		$clientCredentials = new ClientCredentials($oauth2AuthorizationClient, $this->config->toArray());
		$oauth2Plugin = new OAuth2Plugin($clientCredentials);
		$oauth2Plugin->setCache($this->config->getAccessTokenCacheFile());

		$this->client->addSubscriber($oauth2Plugin);
	}
private function setupOAuth2Plugin ( ) { $ oauth2AuthorizationClient = $ this -> resolveClient ( null ) ; $ oauth2AuthorizationClient -> setBaseUrl ( Properties :: authorizationUrl ( ) ) ; $ clientCredentials = new ClientCredentials ( $ oauth2AuthorizationClient , $ this -> config -> toArray ( ) ) ; $ oauth2Plugin = new OAuth2Plugin ( $ clientCredentials ) ; $ oauth2Plugin -> setCache ( $ this -> config -> getAccessTokenCacheFile ( ) ) ; $ this -> client -> addSubscriber ( $ oauth2Plugin ) ; }
setting up the oauth2 plugin for authorizing the requests
setting up the oauth2 plugin for authorizing the requests