Esempio n. 1
0
 /**
  * @param OauthScope|string $scope
  * @return bool
  */
 public function hasScope($scope)
 {
     if (is_string($scope)) {
         foreach ($this->scopes as $tokenScope) {
             if ($tokenScope->getName() == $scope) {
                 return true;
             }
         }
         return false;
     } else {
         return in_array($scope, $this->scopes->toArray());
     }
 }
Esempio n. 2
0
 /**
  * Remove scopes
  *
  * @param OauthScope $scopes
  */
 public function removeScope(OauthScope $scopes)
 {
     $this->scopes->removeElement($scopes);
 }