mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
Renamed scopes.key to scopes.scope. Updated ScopeInterface and PDO/Scope. Fixes #45
This commit is contained in:
@@ -10,7 +10,7 @@ class Scope implements ScopeInterface
|
||||
{
|
||||
$db = \ezcDbInstance::get();
|
||||
|
||||
$stmt = $db->prepare('SELECT * FROM oauth_scopes WHERE oauth_scopes.key = :scope');
|
||||
$stmt = $db->prepare('SELECT * FROM oauth_scopes WHERE oauth_scopes.scope = :scope');
|
||||
$stmt->bindValue(':scope', $scope);
|
||||
$stmt->execute();
|
||||
|
||||
@@ -22,7 +22,7 @@ class Scope implements ScopeInterface
|
||||
|
||||
return array(
|
||||
'id' => $row->id,
|
||||
'scope' => $row->key,
|
||||
'scope' => $row->scope,
|
||||
'name' => $row->name,
|
||||
'description' => $row->description
|
||||
);
|
||||
|
@@ -19,7 +19,7 @@ interface ScopeInterface
|
||||
* Example SQL query:
|
||||
*
|
||||
* <code>
|
||||
* SELECT * FROM oauth_scopes WHERE oauth_scopes.key = :scope
|
||||
* SELECT * FROM oauth_scopes WHERE scope = :scope
|
||||
* </code>
|
||||
*
|
||||
* Response:
|
||||
@@ -28,7 +28,7 @@ interface ScopeInterface
|
||||
* Array
|
||||
* (
|
||||
* [id] => (int) The scope's ID
|
||||
* [key] => (string) The scope itself
|
||||
* [scope] => (string) The scope itself
|
||||
* [name] => (string) The scope's name
|
||||
* [description] => (string) The scope's description
|
||||
* )
|
||||
|
Reference in New Issue
Block a user