Skip to content

Commit

Permalink
Implemented getAuthCodeScopes() in PDO Session
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbilbie committed May 11, 2013
1 parent 11022e1 commit 3ea3eb5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/League/OAuth2/Server/Storage/PDO/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ public function associateAuthCodeScope($sessionId, $scopeId)
$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();
Expand Down

0 comments on commit 3ea3eb5

Please sign in to comment.