From 9372cc85d0526f1644a00c5657f937b70a56a075 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Fri, 10 May 2013 16:50:34 -0700 Subject: [PATCH] Added getAuthCodeScopes() method --- .../Server/Storage/SessionInterface.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/League/OAuth2/Server/Storage/SessionInterface.php b/src/League/OAuth2/Server/Storage/SessionInterface.php index 521fe750..36c335fe 100644 --- a/src/League/OAuth2/Server/Storage/SessionInterface.php +++ b/src/League/OAuth2/Server/Storage/SessionInterface.php @@ -254,6 +254,36 @@ interface SessionInterface * @return void */ public function associateAuthCodeScope($sessionId, $scopeId); + + /** + * Get the scopes associated with an auth code + * + * Example SQL query: + * + * + * SELECT scope_id FROM `oauth_session_authcode_scopes` WHERE session_id = :sessionId + * + * + * Expected response: + * + * + * array( + * array( + * 'scope_id' => (int) + * ), + * array( + * 'scope_id' => (int) + * ), + * ... + * ) + * + * + * @param int $sessionId The session ID + * @return array + */ + public function getAuthCodeScopes($sessionId); + + /** * Associate a scope with an access token * * Example SQL query: