Updated PDO associateAuthCode

This commit is contained in:
Alex Bilbie 2013-05-10 16:56:38 -07:00
parent 51138f8738
commit 410ad09b5c

View File

@ -70,17 +70,18 @@ class Session implements SessionInterface
$stmt->execute(); $stmt->execute();
} }
public function associateAuthCode($sessionId, $authCode, $expireTime, $scopeIds = null) public function associateAuthCode($sessionId, $authCode, $expireTime)
{ {
$db = \ezcDbInstance::get(); $db = \ezcDbInstance::get();
$stmt = $db->prepare('INSERT INTO oauth_session_authcodes (session_id, auth_code, auth_code_expires, scope_ids) $stmt = $db->prepare('INSERT INTO oauth_session_authcodes (session_id, auth_code, auth_code_expires)
VALUE (:sessionId, :authCode, :authCodeExpires, :scopeIds)'); VALUE (:sessionId, :authCode, :authCodeExpires)');
$stmt->bindValue(':sessionId', $sessionId); $stmt->bindValue(':sessionId', $sessionId);
$stmt->bindValue(':authCode', $authCode); $stmt->bindValue(':authCode', $authCode);
$stmt->bindValue(':authCodeExpires', $expireTime); $stmt->bindValue(':authCodeExpires', $expireTime);
$stmt->bindValue(':scopeIds', $scopeIds);
$stmt->execute(); $stmt->execute();
return $db->lastInsertId();
} }
public function removeAuthCode($sessionId) public function removeAuthCode($sessionId)