mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
Updated getScopes
This commit is contained in:
parent
c0d8a2c4fb
commit
d149490c78
@ -269,6 +269,12 @@ class Session implements SessionInterface
|
||||
*/
|
||||
public function getScopes($accessToken)
|
||||
{
|
||||
throw new \Exception('Not implemented - ' . debug_backtrace()[0]['function']);
|
||||
$db = \ezcDbInstance::get();
|
||||
|
||||
$stmt = $db->prepare('SELECT oauth_scopes.* FROM oauth_session_token_scopes JOIN oauth_session_access_tokens ON oauth_session_access_tokens.`id` = `oauth_session_token_scopes`.`session_access_token_id` JOIN oauth_scopes ON oauth_scopes.id = `oauth_session_token_scopes`.`scope_id` WHERE access_token = :accessToken');
|
||||
$stmt->bindValue(':accessToken', $accessToken);
|
||||
|
||||
$result = $stmt->fetchObject();
|
||||
return ($result === false) ? array() : (array) $result;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user