You are here

private function sOAuthServer::check_timestamp in jQuery social stream 7.2

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

check that the timestamp is new enough

1 call to sOAuthServer::check_timestamp()
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 1119
JS callbacks.

Class

sOAuthServer

Code

private function check_timestamp($timestamp) {
  if (!$timestamp) {
    throw new sOAuthException('Missing timestamp parameter. The parameter is required');
  }

  // verify that timestamp is recentish
  $now = time();
  if (abs($now - $timestamp) > $this->timestamp_threshold) {
    throw new sOAuthException("Expired timestamp, yours {$timestamp}, ours {$now}");
  }
}