GitHub PullRequestReviewCommentEvent at 2014-11-24 07:49:32
Repository: restful
Actor: amitaibu
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Gizra/restful/pulls/comments/20775897","id":20775897,"diff_hunk":"@@ -77,5 +79,47 @@ class RestfulTokenAuthenticationTestCase extends DrupalWebTestCase {\n     $response = $handler->get(1, array('access_token' => $access_token));\n     $result = $response[0];\n     $this->assertEqual($result['label'], $title1, 'Article resource can be accessed with valid access token.');\n+\n+    // Set the expiration token to the past.\n+    $query = new \\EntityFieldQuery();\n+    $results = $query\n+      ->entityCondition('entity_type', 'restful_token_auth')\n+      ->entityCondition('bundle', 'refresh_token')\n+      ->propertyCondition('token', $refresh_token)\n+      ->execute();\n+\n+    if (empty($results['restful_token_auth'])) {\n+      $this->fail('No token was found.');\n+    }\n+\n+    // Load the token.\n+    $token = entity_load_single('restful_token_auth', key($results['restful_token_auth']));\n+    $token->expire = time() - 1;\n+    $token->save();\n+\n+    // Make a GET request to trigger a deletion of the token.\n+    $handler->get($id, array('access_token' => $access_token));\n+\n+    // Make sure the token was deleted.\n+    $query = new \\EntityFieldQuery();\n+    $results = $query","path":"modules/restful_token_auth/tests/RestfulTokenAuthenticationTestCase.test","position":58,"original_position":58,"commit_id":"ecfd33b051e42f0faf39469739802d7d98711215","original_commit_id":"346349dad44e95419aa9c29dc31cb57c675a6a59","user":{"login":"amitaibu","id":125707,"avatar_url":"https://avatars.githubusercontent.com/u/125707?v=3","gravatar_id":"","url":"https://api.github.com/users/amitaibu","html_url":"https://github.com/amitaibu","followers_url":"https://api.github.com/users/amitaibu/followers","following_url":"https://api.github.com/users/amitaibu/following{/other_user}","gists_url":"https://api.github.com/users/amitaibu/gists{/gist_id}","starred_url":"https://api.github.com/users/amitaibu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitaibu/subscriptions","organizations_url":"https://api.github.com/users/amitaibu/orgs","repos_url":"https://api.github.com/users/amitaibu/repos","events_url":"https://api.github.com/users/amitaibu/events{/privacy}","received_events_url":"https://api.github.com/users/amitaibu/received_events","type":"User","site_admin":false},"body":"$results => $result","created_at":"2014-11-24T07:49:32Z","updated_at":"2014-11-24T07:49:32Z","html_url":"https://github.com/Gizra/restful/pull/264#discussion_r20775897","pull_request_url":"https://api.github.com/repos/Gizra/restful/pulls/264","_links":{"self":{"href":"https://api.github.com/repos/Gizra/restful/pulls/comments/20775897"},"html":{"href":"https://github.com/Gizra/restful/pull/264#discussion_r20775897"},"pull_request":{"href":"https://api.github.com/repos/Gizra/restful/pulls/264"}}},"pull_request":{"url":"https://api.github.com/repos/Gizra/restful/pulls/264","id":24900361,"html_url":"https://github.com/Gizra/restful/pull/264","diff_url":"https://github.com/Gizra/restful/pull/264.diff","patch_url":"https://github.com/Gizra/restful/pull/264.patch","issue_url":"https://api.github.com/repos/Gizra/restful/issues/264","number":264,"state":"open","locked":false,"title":"Introduce refresh tokens and expirable access tokens.","user":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"body":"This supersedes #230.\r\n\r\nI will explain what's going on in this PR later. I've gotta run now :-P","created_at":"2014-11-23T11:23:09Z","updated_at":"2014-11-24T07:49:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ad4c163339e921d8843a099ea41c47ce2c95156","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Gizra/restful/pulls/264/commits","review_comments_url":"https://api.github.com/repos/Gizra/restful/pulls/264/comments","review_comment_url":"https://api.github.com/repos/Gizra/restful/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Gizra/restful/issues/264/comments","statuses_url":"https://api.github.com/repos/Gizra/restful/statuses/ecfd33b051e42f0faf39469739802d7d98711215","head":{"label":"mateu-aguilo-bosch:222-expiration-token","ref":"222-expiration-token","sha":"ecfd33b051e42f0faf39469739802d7d98711215","user":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"repo":{"id":19935082,"name":"restful","full_name":"mateu-aguilo-bosch/restful","owner":{"login":"mateu-aguilo-bosch","id":1140906,"avatar_url":"https://avatars.githubusercontent.com/u/1140906?v=3","gravatar_id":"","url":"https://api.github.com/users/mateu-aguilo-bosch","html_url":"https://github.com/mateu-aguilo-bosch","followers_url":"https://api.github.com/users/mateu-aguilo-bosch/followers","following_url":"https://api.github.com/users/mateu-aguilo-bosch/following{/other_user}","gists_url":"https://api.github.com/users/mateu-aguilo-bosch/gists{/gist_id}","starred_url":"https://api.github.com/users/mateu-aguilo-bosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mateu-aguilo-bosch/subscriptions","organizations_url":"https://api.github.com/users/mateu-aguilo-bosch/orgs","repos_url":"https://api.github.com/users/mateu-aguilo-bosch/repos","events_url":"https://api.github.com/users/mateu-aguilo-bosch/events{/privacy}","received_events_url":"https://api.github.com/users/mateu-aguilo-bosch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mateu-aguilo-bosch/restful","description":"RESTful best practices for Drupal","fork":true,"url":"https://api.github.com/repos/mateu-aguilo-bosch/restful","forks_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/forks","keys_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/teams","hooks_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/hooks","issue_events_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/issues/events{/number}","events_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/events","assignees_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/assignees{/user}","branches_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/branches{/branch}","tags_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/tags","blobs_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/languages","stargazers_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/stargazers","contributors_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/contributors","subscribers_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/subscribers","subscription_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/subscription","commits_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/issues/comments/{number}","contents_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/contents/{+path}","compare_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/merges","archive_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/downloads","issues_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/issues{/number}","pulls_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/labels{/name}","releases_url":"https://api.github.com/repos/mateu-aguilo-bosch/restful/releases{/id}","created_at":"2014-05-19T08:55:09Z","updated_at":"2014-11-23T08:05:02Z","pushed_at":"2014-11-24T07:41:04Z","git_url":"git://github.com/mateu-aguilo-bosch/restful.git","ssh_url":"git@github.com:mateu-aguilo-bosch/restful.git","clone_url":"https://github.com/mateu-aguilo-bosch/restful.git","svn_url":"https://github.com/mateu-aguilo-bosch/restful","homepage":"","size":2374,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"7.x-1.x"}},"base":{"label":"Gizra:7.x-1.x","ref":"7.x-1.x","sha":"f1e3c8010cd8c39bf80bd474ad1a8074bf6bbb52","user":{"login":"Gizra","id":2484795,"avatar_url":"https://avatars.githubusercontent.com/u/2484795?v=3","gravatar_id":"","url":"https://api.github.com/users/Gizra","html_url":"https://github.com/Gizra","followers_url":"https://api.github.com/users/Gizra/followers","following_url":"https://api.github.com/users/Gizra/following{/other_user}","gists_url":"https://api.github.com/users/Gizra/gists{/gist_id}","starred_url":"https://api.github.com/users/Gizra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gizra/subscriptions","organizations_url":"https://api.github.com/users/Gizra/orgs","repos_url":"https://api.github.com/users/Gizra/repos","events_url":"https://api.github.com/users/Gizra/events{/privacy}","received_events_url":"https://api.github.com/users/Gizra/received_events","type":"Organization","site_admin":false},"repo":{"id":17918315,"name":"restful","full_name":"Gizra/restful","owner":{"login":"Gizra","id":2484795,"avatar_url":"https://avatars.githubusercontent.com/u/2484795?v=3","gravatar_id":"","url":"https://api.github.com/users/Gizra","html_url":"https://github.com/Gizra","followers_url":"https://api.github.com/users/Gizra/followers","following_url":"https://api.github.com/users/Gizra/following{/other_user}","gists_url":"https://api.github.com/users/Gizra/gists{/gist_id}","starred_url":"https://api.github.com/users/Gizra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gizra/subscriptions","organizations_url":"https://api.github.com/users/Gizra/orgs","repos_url":"https://api.github.com/users/Gizra/repos","events_url":"https://api.github.com/users/Gizra/events{/privacy}","received_events_url":"https://api.github.com/users/Gizra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Gizra/restful","description":"RESTful best practices for Drupal","fork":false,"url":"https://api.github.com/repos/Gizra/restful","forks_url":"https://api.github.com/repos/Gizra/restful/forks","keys_url":"https://api.github.com/repos/Gizra/restful/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gizra/restful/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gizra/restful/teams","hooks_url":"https://api.github.com/repos/Gizra/restful/hooks","issue_events_url":"https://api.github.com/repos/Gizra/restful/issues/events{/number}","events_url":"https://api.github.com/repos/Gizra/restful/events","assignees_url":"https://api.github.com/repos/Gizra/restful/assignees{/user}","branches_url":"https://api.github.com/repos/Gizra/restful/branches{/branch}","tags_url":"https://api.github.com/repos/Gizra/restful/tags","blobs_url":"https://api.github.com/repos/Gizra/restful/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gizra/restful/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gizra/restful/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gizra/restful/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gizra/restful/statuses/{sha}","languages_url":"https://api.github.com/repos/Gizra/restful/languages","stargazers_url":"https://api.github.com/repos/Gizra/restful/stargazers","contributors_url":"https://api.github.com/repos/Gizra/restful/contributors","subscribers_url":"https://api.github.com/repos/Gizra/restful/subscribers","subscription_url":"https://api.github.com/repos/Gizra/restful/subscription","commits_url":"https://api.github.com/repos/Gizra/restful/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gizra/restful/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gizra/restful/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gizra/restful/issues/comments/{number}","contents_url":"https://api.github.com/repos/Gizra/restful/contents/{+path}","compare_url":"https://api.github.com/repos/Gizra/restful/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gizra/restful/merges","archive_url":"https://api.github.com/repos/Gizra/restful/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gizra/restful/downloads","issues_url":"https://api.github.com/repos/Gizra/restful/issues{/number}","pulls_url":"https://api.github.com/repos/Gizra/restful/pulls{/number}","milestones_url":"https://api.github.com/repos/Gizra/restful/milestones{/number}","notifications_url":"https://api.github.com/repos/Gizra/restful/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gizra/restful/labels{/name}","releases_url":"https://api.github.com/repos/Gizra/restful/releases{/id}","created_at":"2014-03-19T19:58:55Z","updated_at":"2014-11-23T17:49:38Z","pushed_at":"2014-11-23T08:53:32Z","git_url":"git://github.com/Gizra/restful.git","ssh_url":"git@github.com:Gizra/restful.git","clone_url":"https://github.com/Gizra/restful.git","svn_url":"https://github.com/Gizra/restful","homepage":"","size":11051,"stargazers_count":140,"watchers_count":140,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":33,"forks":28,"open_issues":33,"watchers":140,"default_branch":"7.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/Gizra/restful/pulls/264"},"html":{"href":"https://github.com/Gizra/restful/pull/264"},"issue":{"href":"https://api.github.com/repos/Gizra/restful/issues/264"},"comments":{"href":"https://api.github.com/repos/Gizra/restful/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/Gizra/restful/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/Gizra/restful/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Gizra/restful/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/Gizra/restful/statuses/ecfd33b051e42f0faf39469739802d7d98711215"}}}}