Commits

William Durand committed 09a364e Merge

Merge pull request #37 from benjamindulau/client_credentials_scopes

Fixed supported scopes handling when grant_type is client_credentials

  • Participants
  • Parent commits f890a3c, 5a3c2a7
  • Tags 1.0.7

Comments (0)

Files changed (1)

File lib/OAuth2/OAuth2.php

     }
 
     if (!is_array($stored)) {
-      $stored = array();
+      $stored = array('scope' => $this->getVariable(self::CONFIG_SUPPORTED_SCOPES, null));
     }
 
-    $stored += array('scope' => NULL, 'data' => NULL);
+    $stored += array('scope' => null, 'data' => null);
 
     // Check scope, if provided
     if ($input["scope"] && (!isset($stored["scope"]) || !$this->checkScope($input["scope"], $stored["scope"]))) {