diff --git a/lib/Auth/TokenFetcher.php b/lib/Auth/TokenFetcher.php index 7eb6d6d..d12b4e4 100644 --- a/lib/Auth/TokenFetcher.php +++ b/lib/Auth/TokenFetcher.php @@ -71,13 +71,10 @@ public function __construct( * @param array $scopes * @param array $additionalParams * @return array - * @throws LogicException * @throws RuntimeException */ public function fetch($url, $grantType, array $scopes, array $additionalParams = []) { - $this->validateScopesNotEmpty($scopes); - $formParams = array_merge([ 'client_id' => $this->configuration->getClientId(), 'client_secret' => $this->configuration->getClientSecret(), @@ -92,17 +89,6 @@ public function fetch($url, $grantType, array $scopes, array $additionalParams = return json_decode($response, true); } - /** - * @param array $scopes - * @throws LogicException - */ - public function validateScopesNotEmpty(array $scopes) - { - if (count($scopes) === 0) { - throw new LogicException('Cannot fetch token when no scopes where defined'); - } - } - /** * @param $url * @param $body @@ -124,4 +110,4 @@ private function makeRequest($url, $body) return (string)$response->getBody(); } -} \ No newline at end of file +}