You are here

private function sOAuthServer::check_nonce in jQuery social stream 7

Same name and namespace in other branches
  1. 7.2 jquery_social_stream.js.inc \sOAuthServer::check_nonce()

check that the nonce is not repeated

1 call to sOAuthServer::check_nonce()
sOAuthServer::check_signature in ./jquery_social_stream.js.inc
all-in-one function to check the signature on a request should guess the signature method appropriately

File

./jquery_social_stream.js.inc, line 1006
JS callbacks.

Class

sOAuthServer

Code

private function check_nonce($consumer, $token, $nonce, $timestamp) {
  if (!$nonce) {
    throw new sOAuthException('Missing nonce parameter. The parameter is required');
  }

  // verify that the nonce is uniqueish
  $found = $this->data_store
    ->lookup_nonce($consumer, $token, $nonce, $timestamp);
  if ($found) {
    throw new sOAuthException("Nonce already used: {$nonce}");
  }
}