Из базы удалена таблица oauth_scopes

This commit is contained in:
ErickSkrauch
2016-11-27 19:19:13 +03:00
parent 744ec9520a
commit 1e94cda399
4 changed files with 35 additions and 14 deletions

View File

@@ -12,14 +12,12 @@ class ScopeStorage extends AbstractStorage implements ScopeInterface {
* @inheritdoc
*/
public function get($scope, $grantType = null, $clientId = null) {
/** @var OauthScope|null $row */
$row = OauthScope::findOne($scope);
if ($row === null) {
if (!in_array($scope, OauthScope::getScopes(), true)) {
return null;
}
$entity = new ScopeEntity($this->server);
$entity->setId($row->id);
$entity->setId($scope);
return $entity;
}