Return the session_id for validateAuthCode instead of an array

This commit is contained in:
Alex Bilbie 2013-05-10 16:53:52 -07:00
parent aa8d38108f
commit 51138f8738

View File

@ -133,27 +133,18 @@ interface SessionInterface
* Example SQL query: * Example SQL query:
* *
* <code> * <code>
* SELECT oauth_sessions.id, oauth_session_authcodes.scope_ids FROM oauth_sessions * SELECT oauth_sessions.id FROM oauth_sessions
* JOIN oauth_session_authcodes ON oauth_session_authcodes.`session_id` = oauth_sessions.id * JOIN oauth_session_authcodes ON oauth_session_authcodes.`session_id` = oauth_sessions.id
* JOIN oauth_session_redirects ON oauth_session_redirects.`session_id` = oauth_sessions.id WHERE * JOIN oauth_session_redirects ON oauth_session_redirects.`session_id` = oauth_sessions.id
* oauth_sessions.client_id = :clientId AND oauth_session_authcodes.`auth_code` = :authCode * WHERE oauth_sessions.client_id = :clientId AND oauth_session_authcodes.`auth_code` = :authCode
* AND `oauth_session_authcodes`.`auth_code_expires` >= :time AND * AND `oauth_session_authcodes`.`auth_code_expires` >= :time AND
* `oauth_session_redirects`.`redirect_uri` = :redirectUri * `oauth_session_redirects`.`redirect_uri` = :redirectUri
* </code> * </code>
* *
* Expected response:
*
* <code>
* array(
* 'id' => (int), // the session ID
* 'scope_ids' => (string)
* )
* </code>
*
* @param string $clientId The client ID * @param string $clientId The client ID
* @param string $redirectUri The redirect URI * @param string $redirectUri The redirect URI
* @param string $authCode The authorization code * @param string $authCode The authorization code
* @return array|bool False if invalid or array as above * @return int|bool False if invalid or the session ID
*/ */
public function validateAuthCode($clientId, $redirectUri, $authCode); public function validateAuthCode($clientId, $redirectUri, $authCode);