mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-02 00:43:11 +05:30
Fixed associateAuthCodeScope() query
This commit is contained in:
parent
d531a37412
commit
ef4a138237
@ -161,12 +161,12 @@ class Session implements SessionInterface
|
|||||||
return ($result === false) ? false : (array) $result;
|
return ($result === false) ? false : (array) $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function associateAuthCodeScope($sessionId, $scopeId)
|
public function associateAuthCodeScope($authCodeId, $scopeId)
|
||||||
{
|
{
|
||||||
$db = \ezcDbInstance::get();
|
$db = \ezcDbInstance::get();
|
||||||
|
|
||||||
$stmt = $db->prepare('INSERT INTO `oauth_session_authcode_scopes` (`session_id`, `scope_id`) VALUES (:sessionId, :scopeId)');
|
$stmt = $db->prepare('INSERT INTO `oauth_session_authcode_scopes` (`oauth_session_authcode_id`, `scope_id`) VALUES (:authCodeId, :scopeId)');
|
||||||
$stmt->bindValue(':sessionId', $sessionId);
|
$stmt->bindValue(':authCodeId', $authCodeId);
|
||||||
$stmt->bindValue(':scopeId', $scopeId);
|
$stmt->bindValue(':scopeId', $scopeId);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
}
|
}
|
||||||
|
@ -245,14 +245,15 @@ interface SessionInterface
|
|||||||
* Example SQL query:
|
* Example SQL query:
|
||||||
*
|
*
|
||||||
* <code>
|
* <code>
|
||||||
* INSERT INTO `oauth_session_authcode_scopes` (`session_id`, `scope_id`) VALUES (:sessionId, :scopeId)
|
* INSERT INTO `oauth_session_authcode_scopes` (`oauth_session_authcode_id`, `scope_id`) VALUES
|
||||||
|
* (:authCodeId, :scopeId)
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @param int $sessionId The session ID
|
* @param int $authCodeId The auth code ID
|
||||||
* @param int $scopeId The scope ID
|
* @param int $scopeId The scope ID
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function associateAuthCodeScope($sessionId, $scopeId);
|
public function associateAuthCodeScope($authCodeId, $scopeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the scopes associated with an auth code
|
* Get the scopes associated with an auth code
|
||||||
|
Loading…
Reference in New Issue
Block a user