public function OAuthStoreOracle::checkServerNonce in Lingotek Translation 7.5
Same name and namespace in other branches
- 7.7 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::checkServerNonce()
- 7.2 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::checkServerNonce()
- 7.3 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::checkServerNonce()
- 7.4 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::checkServerNonce()
- 7.6 lib/oauth-php/library/store/OAuthStoreOracle.php \OAuthStoreOracle::checkServerNonce()
* Check an nonce/timestamp combination. Clears any nonce combinations * that are older than the one received. * *
Parameters
string consumer_key: * @param string token * @param int timestamp * @param string nonce * @exception OAuthException2 thrown when the timestamp is not in sequence or nonce is not unique
Overrides OAuthStoreAbstract::checkServerNonce
File
- lib/
oauth-php/ library/ store/ OAuthStoreOracle.php, line 1388
Class
Code
public function checkServerNonce($consumer_key, $token, $timestamp, $nonce) {
$sql = "BEGIN SP_CHECK_SERVER_NONCE(:P_CONSUMER_KEY, :P_TOKEN, :P_TIMESTAMP, :P_MAX_TIMESTAMP_SKEW, :P_NONCE, :P_RESULT); END;";
// parse sql
$stmt = oci_parse($this->conn, $sql) or die('Can not parse query');
// Bind In and Out Variables
oci_bind_by_name($stmt, ':P_CONSUMER_KEY', $consumer_key, 255);
oci_bind_by_name($stmt, ':P_TOKEN', $token, 255);
oci_bind_by_name($stmt, ':P_TIMESTAMP', $timestamp, 255);
oci_bind_by_name($stmt, ':P_MAX_TIMESTAMP_SKEW', $this->max_timestamp_skew, 20);
oci_bind_by_name($stmt, ':P_NONCE', $nonce, 255);
oci_bind_by_name($stmt, ':P_RESULT', $result, 20);
//Execute the statement
oci_execute($stmt);
}