{"action":"created","comment":{"url":"https://api.github.com/repos/elifesciences/annotations/pulls/comments/156690621","pull_request_review_id":83208818,"id":156690621,"diff_hunk":"@@ -0,0 +1,61 @@\n+<?php\n+\n+namespace eLife\\HypothesisClient\\Credentials;\n+\n+use Firebase\\JWT\\JWT;\n+\n+class JWTSigningCredentials extends Credentials\n+{\n+    private $expire;\n+    private $startTime;\n+\n+    public function __construct(string $clientId, string $clientSecret, string $authority, int $expire = 600, int $startTime = null)","path":"src/HypothesisClient/Credentials/JWTSigningCredentials.php","position":12,"original_position":12,"commit_id":"15a791dc57f67cd1cfcd16902030bbe61bb01d7e","original_commit_id":"15a791dc57f67cd1cfcd16902030bbe61bb01d7e","user":{"login":"nlisgo","id":383397,"avatar_url":"https://avatars2.githubusercontent.com/u/383397?v=4","gravatar_id":"","url":"https://api.github.com/users/nlisgo","html_url":"https://github.com/nlisgo","followers_url":"https://api.github.com/users/nlisgo/followers","following_url":"https://api.github.com/users/nlisgo/following{/other_user}","gists_url":"https://api.github.com/users/nlisgo/gists{/gist_id}","starred_url":"https://api.github.com/users/nlisgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlisgo/subscriptions","organizations_url":"https://api.github.com/users/nlisgo/orgs","repos_url":"https://api.github.com/users/nlisgo/repos","events_url":"https://api.github.com/users/nlisgo/events{/privacy}","received_events_url":"https://api.github.com/users/nlisgo/received_events","type":"User","site_admin":false},"body":"I intend for `JWTSigningCredntials` to be instantiated in `Kernel` and so setting a `startTime` as a constructor argument is not going to work when we need to make token requests in the long running process. We really need the start time to be reset every when we generate the JWT.","created_at":"2017-12-13T15:27:13Z","updated_at":"2017-12-13T15:27:13Z","html_url":"https://github.com/elifesciences/annotations/pull/33#discussion_r156690621","pull_request_url":"https://api.github.com/repos/elifesciences/annotations/pulls/33","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/elifesciences/annotations/pulls/comments/156690621"},"html":{"href":"https://github.com/elifesciences/annotations/pull/33#discussion_r156690621"},"pull_request":{"href":"https://api.github.com/repos/elifesciences/annotations/pulls/33"}},"in_reply_to_id":156674497},"pull_request":{"url":"https://api.github.com/repos/elifesciences/annotations/pulls/33","id":157912275,"html_url":"https://github.com/elifesciences/annotations/pull/33","diff_url":"https://github.com/elifesciences/annotations/pull/33.diff","patch_url":"https://github.com/elifesciences/annotations/pull/33.patch","issue_url":"https://api.github.com/repos/elifesciences/annotations/issues/33","number":33,"state":"open","locked":false,"title":"Extend credentials to allow for jwt signing","user":{"login":"nlisgo","id":383397,"avatar_url":"https://avatars2.githubusercontent.com/u/383397?v=4","gravatar_id":"","url":"https://api.github.com/users/nlisgo","html_url":"https://github.com/nlisgo","followers_url":"https://api.github.com/users/nlisgo/followers","following_url":"https://api.github.com/users/nlisgo/following{/other_user}","gists_url":"https://api.github.com/users/nlisgo/gists{/gist_id}","starred_url":"https://api.github.com/users/nlisgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlisgo/subscriptions","organizations_url":"https://api.github.com/users/nlisgo/orgs","repos_url":"https://api.github.com/users/nlisgo/repos","events_url":"https://api.github.com/users/nlisgo/events{/privacy}","received_events_url":"https://api.github.com/users/nlisgo/received_events","type":"User","site_admin":false},"body":"In order to access annotations for a user we must authenticate as that user. In order to do that we need to request an access token. There are 2 types of credential `user_management` and `jwt_signing`.\r\n\r\nIf this is accepted we must make some changes to the formula to add the `jwt_signing` credentials.","created_at":"2017-12-12T19:04:10Z","updated_at":"2017-12-13T15:27:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39fe6170cbaba286150c10085fed648bb73ac4de","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/elifesciences/annotations/pulls/33/commits","review_comments_url":"https://api.github.com/repos/elifesciences/annotations/pulls/33/comments","review_comment_url":"https://api.github.com/repos/elifesciences/annotations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elifesciences/annotations/issues/33/comments","statuses_url":"https://api.github.com/repos/elifesciences/annotations/statuses/15a791dc57f67cd1cfcd16902030bbe61bb01d7e","head":{"label":"elifesciences:refactor-credentials","ref":"refactor-credentials","sha":"15a791dc57f67cd1cfcd16902030bbe61bb01d7e","user":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"repo":{"id":99697931,"name":"annotations","full_name":"elifesciences/annotations","owner":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elifesciences/annotations","description":"Annotations service backend","fork":false,"url":"https://api.github.com/repos/elifesciences/annotations","forks_url":"https://api.github.com/repos/elifesciences/annotations/forks","keys_url":"https://api.github.com/repos/elifesciences/annotations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elifesciences/annotations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elifesciences/annotations/teams","hooks_url":"https://api.github.com/repos/elifesciences/annotations/hooks","issue_events_url":"https://api.github.com/repos/elifesciences/annotations/issues/events{/number}","events_url":"https://api.github.com/repos/elifesciences/annotations/events","assignees_url":"https://api.github.com/repos/elifesciences/annotations/assignees{/user}","branches_url":"https://api.github.com/repos/elifesciences/annotations/branches{/branch}","tags_url":"https://api.github.com/repos/elifesciences/annotations/tags","blobs_url":"https://api.github.com/repos/elifesciences/annotations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elifesciences/annotations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elifesciences/annotations/git/refs{/sha}","trees_url":"https://api.github.com/repos/elifesciences/annotations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elifesciences/annotations/statuses/{sha}","languages_url":"https://api.github.com/repos/elifesciences/annotations/languages","stargazers_url":"https://api.github.com/repos/elifesciences/annotations/stargazers","contributors_url":"https://api.github.com/repos/elifesciences/annotations/contributors","subscribers_url":"https://api.github.com/repos/elifesciences/annotations/subscribers","subscription_url":"https://api.github.com/repos/elifesciences/annotations/subscription","commits_url":"https://api.github.com/repos/elifesciences/annotations/commits{/sha}","git_commits_url":"https://api.github.com/repos/elifesciences/annotations/git/commits{/sha}","comments_url":"https://api.github.com/repos/elifesciences/annotations/comments{/number}","issue_comment_url":"https://api.github.com/repos/elifesciences/annotations/issues/comments{/number}","contents_url":"https://api.github.com/repos/elifesciences/annotations/contents/{+path}","compare_url":"https://api.github.com/repos/elifesciences/annotations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elifesciences/annotations/merges","archive_url":"https://api.github.com/repos/elifesciences/annotations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elifesciences/annotations/downloads","issues_url":"https://api.github.com/repos/elifesciences/annotations/issues{/number}","pulls_url":"https://api.github.com/repos/elifesciences/annotations/pulls{/number}","milestones_url":"https://api.github.com/repos/elifesciences/annotations/milestones{/number}","notifications_url":"https://api.github.com/repos/elifesciences/annotations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elifesciences/annotations/labels{/name}","releases_url":"https://api.github.com/repos/elifesciences/annotations/releases{/id}","deployments_url":"https://api.github.com/repos/elifesciences/annotations/deployments","created_at":"2017-08-08T13:48:30Z","updated_at":"2017-10-10T20:14:50Z","pushed_at":"2017-12-13T13:06:10Z","git_url":"git://github.com/elifesciences/annotations.git","ssh_url":"git@github.com:elifesciences/annotations.git","clone_url":"https://github.com/elifesciences/annotations.git","svn_url":"https://github.com/elifesciences/annotations","homepage":null,"size":244,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"elifesciences:develop","ref":"develop","sha":"a7898a2527e8b1abf0f87bcfac7cb3c96ed3ee02","user":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"repo":{"id":99697931,"name":"annotations","full_name":"elifesciences/annotations","owner":{"login":"elifesciences","id":1777367,"avatar_url":"https://avatars2.githubusercontent.com/u/1777367?v=4","gravatar_id":"","url":"https://api.github.com/users/elifesciences","html_url":"https://github.com/elifesciences","followers_url":"https://api.github.com/users/elifesciences/followers","following_url":"https://api.github.com/users/elifesciences/following{/other_user}","gists_url":"https://api.github.com/users/elifesciences/gists{/gist_id}","starred_url":"https://api.github.com/users/elifesciences/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elifesciences/subscriptions","organizations_url":"https://api.github.com/users/elifesciences/orgs","repos_url":"https://api.github.com/users/elifesciences/repos","events_url":"https://api.github.com/users/elifesciences/events{/privacy}","received_events_url":"https://api.github.com/users/elifesciences/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elifesciences/annotations","description":"Annotations service backend","fork":false,"url":"https://api.github.com/repos/elifesciences/annotations","forks_url":"https://api.github.com/repos/elifesciences/annotations/forks","keys_url":"https://api.github.com/repos/elifesciences/annotations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elifesciences/annotations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elifesciences/annotations/teams","hooks_url":"https://api.github.com/repos/elifesciences/annotations/hooks","issue_events_url":"https://api.github.com/repos/elifesciences/annotations/issues/events{/number}","events_url":"https://api.github.com/repos/elifesciences/annotations/events","assignees_url":"https://api.github.com/repos/elifesciences/annotations/assignees{/user}","branches_url":"https://api.github.com/repos/elifesciences/annotations/branches{/branch}","tags_url":"https://api.github.com/repos/elifesciences/annotations/tags","blobs_url":"https://api.github.com/repos/elifesciences/annotations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elifesciences/annotations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elifesciences/annotations/git/refs{/sha}","trees_url":"https://api.github.com/repos/elifesciences/annotations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elifesciences/annotations/statuses/{sha}","languages_url":"https://api.github.com/repos/elifesciences/annotations/languages","stargazers_url":"https://api.github.com/repos/elifesciences/annotations/stargazers","contributors_url":"https://api.github.com/repos/elifesciences/annotations/contributors","subscribers_url":"https://api.github.com/repos/elifesciences/annotations/subscribers","subscription_url":"https://api.github.com/repos/elifesciences/annotations/subscription","commits_url":"https://api.github.com/repos/elifesciences/annotations/commits{/sha}","git_commits_url":"https://api.github.com/repos/elifesciences/annotations/git/commits{/sha}","comments_url":"https://api.github.com/repos/elifesciences/annotations/comments{/number}","issue_comment_url":"https://api.github.com/repos/elifesciences/annotations/issues/comments{/number}","contents_url":"https://api.github.com/repos/elifesciences/annotations/contents/{+path}","compare_url":"https://api.github.com/repos/elifesciences/annotations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elifesciences/annotations/merges","archive_url":"https://api.github.com/repos/elifesciences/annotations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elifesciences/annotations/downloads","issues_url":"https://api.github.com/repos/elifesciences/annotations/issues{/number}","pulls_url":"https://api.github.com/repos/elifesciences/annotations/pulls{/number}","milestones_url":"https://api.github.com/repos/elifesciences/annotations/milestones{/number}","notifications_url":"https://api.github.com/repos/elifesciences/annotations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elifesciences/annotations/labels{/name}","releases_url":"https://api.github.com/repos/elifesciences/annotations/releases{/id}","deployments_url":"https://api.github.com/repos/elifesciences/annotations/deployments","created_at":"2017-08-08T13:48:30Z","updated_at":"2017-10-10T20:14:50Z","pushed_at":"2017-12-13T13:06:10Z","git_url":"git://github.com/elifesciences/annotations.git","ssh_url":"git@github.com:elifesciences/annotations.git","clone_url":"https://github.com/elifesciences/annotations.git","svn_url":"https://github.com/elifesciences/annotations","homepage":null,"size":244,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/elifesciences/annotations/pulls/33"},"html":{"href":"https://github.com/elifesciences/annotations/pull/33"},"issue":{"href":"https://api.github.com/repos/elifesciences/annotations/issues/33"},"comments":{"href":"https://api.github.com/repos/elifesciences/annotations/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/elifesciences/annotations/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/elifesciences/annotations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elifesciences/annotations/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/elifesciences/annotations/statuses/15a791dc57f67cd1cfcd16902030bbe61bb01d7e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"nlisgo"}}