Skip to content

Commit

Permalink
Revert "Return the session_id for validateAuthCode instead of an array"
Browse files Browse the repository at this point in the history
This reverts commit 51138f8.
  • Loading branch information
alexbilbie committed May 10, 2013
1 parent 591139f commit c66c809
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/League/OAuth2/Server/Storage/SessionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,27 @@ public function removeAuthCode($sessionId);
* Example SQL query:
*
* <code>
* SELECT oauth_sessions.id FROM oauth_sessions
* SELECT oauth_sessions.id, oauth_session_authcodes.scope_ids FROM oauth_sessions
* 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 oauth_sessions.client_id = :clientId AND oauth_session_authcodes.`auth_code` = :authCode
* JOIN oauth_session_redirects ON oauth_session_redirects.`session_id` = oauth_sessions.id WHERE
* oauth_sessions.client_id = :clientId AND oauth_session_authcodes.`auth_code` = :authCode
* AND `oauth_session_authcodes`.`auth_code_expires` >= :time AND
* `oauth_session_redirects`.`redirect_uri` = :redirectUri
* </code>
*
* Expected response:
*
* <code>
* array(
* 'id' => (int), // the session ID
* 'scope_ids' => (string)
* )
* </code>
*
* @param string $clientId The client ID
* @param string $redirectUri The redirect URI
* @param string $authCode The authorization code
* @return int|bool False if invalid or the session ID
* @return array|bool False if invalid or array as above
*/
public function validateAuthCode($clientId, $redirectUri, $authCode);

Expand Down

0 comments on commit c66c809

Please sign in to comment.