You are here

private function OAuthServer::check_timestamp in OAuth 1.0 6

Same name and namespace in other branches
  1. 6.3 lib/OAuth.php \OAuthServer::check_timestamp()
  2. 7.3 lib/OAuth.php \OAuthServer::check_timestamp()

check that the timestamp is new enough

1 call to OAuthServer::check_timestamp()
OAuthServer::check_signature in ./OAuth.php
all-in-one function to check the signature on a request should guess the signature method appropriately

File

./OAuth.php, line 612

Class

OAuthServer

Code

private function check_timestamp($timestamp) {

  /*{{{*/

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