From 3ea3eb5ebd5851cd676caca97790220f3effb75d Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 10 May 2013 17:07:06 -0700 Subject: [PATCH] Implemented getAuthCodeScopes() in PDO Session --- src/League/OAuth2/Server/Storage/PDO/Session.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/League/OAuth2/Server/Storage/PDO/Session.php b/src/League/OAuth2/Server/Storage/PDO/Session.php index d03446d6..af0c6bec 100644 --- a/src/League/OAuth2/Server/Storage/PDO/Session.php +++ b/src/League/OAuth2/Server/Storage/PDO/Session.php @@ -171,6 +171,17 @@ class Session implements SessionInterface $stmt->execute(); } + public function getAuthCodeScopes($oauthSessionAuthCodeId) + { + $db = \ezcDbInstance::get(); + + $stmt = $db->prepare('SELECT scope_id FROM `oauth_session_authcode_scopes` WHERE oauth_session_authcode_id = :authCodeId'); + $stmt->bindValue(':authCodeId', $oauthSessionAuthCodeId); + $stmt->execute(); + + return $stmt->fetchAll(); + } + public function associateScope($accessTokenId, $scopeId) { $db = \ezcDbInstance::get();