Skip to content

Instantly share code, notes, and snippets.

@zircote
Created February 16, 2012 19:39
Show Gist options
  • Select an option

  • Save zircote/1847202 to your computer and use it in GitHub Desktop.

Select an option

Save zircote/1847202 to your computer and use it in GitHub Desktop.
A oauth nonce check utilizing Mongo
<?php
$closure = function(){
$mongo = new MongoDB(new Mongo(), 'ibp_oauth');
return (bool) $mongo->selectCollection('nonce')->findOne(
array(
'consumer_key' => '988e5a4582374786de12f5254b4b12b6',
'access_key' => '4bcf3f8a517e39c65f74883b4b0e5b78',
'timestamp' => 1329412801
)
);
};
var_dump($closure());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment