{"action":"created","comment":{"url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/comments/158299448","pull_request_review_id":85087955,"id":158299448,"diff_hunk":"@@ -30,24 +30,50 @@ class JwtAuthenticator implements AuthenticatorInterface\n      */\n     private $jwt;\n \n+    /**\n+     * @var string\n+     */\n+    private $jws;\n+\n+    /**\n+     * @var \\DateInterval\n+     */\n+    private $jwsLifetime;\n+\n+    /**\n+     * @var \\DateTime\n+     */\n+    private $jwsValidTo;\n+\n     /**\n      * Constructor.\n      *\n-     * @param JwtInterface $jwt\n+     * @param JwtInterface  $jwt\n+     * @param \\DateInterval $jwsLifetime","path":"src/Protocol/Http/Authenticator/JwtAuthenticator.php","position":24,"original_position":24,"commit_id":"5e82a643ea84025bc931e67b2418c7eb3f48174e","original_commit_id":"5e82a643ea84025bc931e67b2418c7eb3f48174e","user":{"login":"ZhukV","id":2256109,"avatar_url":"https://avatars2.githubusercontent.com/u/2256109?v=4","gravatar_id":"","url":"https://api.github.com/users/ZhukV","html_url":"https://github.com/ZhukV","followers_url":"https://api.github.com/users/ZhukV/followers","following_url":"https://api.github.com/users/ZhukV/following{/other_user}","gists_url":"https://api.github.com/users/ZhukV/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhukV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhukV/subscriptions","organizations_url":"https://api.github.com/users/ZhukV/orgs","repos_url":"https://api.github.com/users/ZhukV/repos","events_url":"https://api.github.com/users/ZhukV/events{/privacy}","received_events_url":"https://api.github.com/users/ZhukV/received_events","type":"User","site_admin":false},"body":"Please add the new blank line after last `@param` (before `@throws`). This is code style for easy reading the comment of the method.","created_at":"2017-12-21T15:07:57Z","updated_at":"2017-12-21T15:10:01Z","html_url":"https://github.com/ZhukV/AppleApnPush/pull/48#discussion_r158299448","pull_request_url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/comments/158299448"},"html":{"href":"https://github.com/ZhukV/AppleApnPush/pull/48#discussion_r158299448"},"pull_request":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48","id":159616327,"html_url":"https://github.com/ZhukV/AppleApnPush/pull/48","diff_url":"https://github.com/ZhukV/AppleApnPush/pull/48.diff","patch_url":"https://github.com/ZhukV/AppleApnPush/pull/48.patch","issue_url":"https://api.github.com/repos/ZhukV/AppleApnPush/issues/48","number":48,"state":"open","locked":false,"title":"change jwt authenticator: do not regenerate jws token per each request","user":{"login":"Azwartin","id":7689921,"avatar_url":"https://avatars0.githubusercontent.com/u/7689921?v=4","gravatar_id":"","url":"https://api.github.com/users/Azwartin","html_url":"https://github.com/Azwartin","followers_url":"https://api.github.com/users/Azwartin/followers","following_url":"https://api.github.com/users/Azwartin/following{/other_user}","gists_url":"https://api.github.com/users/Azwartin/gists{/gist_id}","starred_url":"https://api.github.com/users/Azwartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azwartin/subscriptions","organizations_url":"https://api.github.com/users/Azwartin/orgs","repos_url":"https://api.github.com/users/Azwartin/repos","events_url":"https://api.github.com/users/Azwartin/events{/privacy}","received_events_url":"https://api.github.com/users/Azwartin/received_events","type":"User","site_admin":false},"body":"When we send multiply notification by\r\n` foreach ($tokens as $token) {\r\n                $receiver = new Receiver(new DeviceToken($token), 'bundle');\r\n                $client->send($receiver, $notification);\r\n}`\r\neach $client->send calls authenticator->authenticate method, which regenerate jws for each send.\r\nBecause of this, APNS returns the 429 exception. It is described here https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html.\r\nNow authenticator does not generate a new provider authentication token for each push request that it send. Did i miss something","created_at":"2017-12-21T09:55:35Z","updated_at":"2017-12-21T15:10:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9147d4bfcd7dde8e282f17b853985ed8bf6eda0b","assignee":{"login":"Azwartin","id":7689921,"avatar_url":"https://avatars0.githubusercontent.com/u/7689921?v=4","gravatar_id":"","url":"https://api.github.com/users/Azwartin","html_url":"https://github.com/Azwartin","followers_url":"https://api.github.com/users/Azwartin/followers","following_url":"https://api.github.com/users/Azwartin/following{/other_user}","gists_url":"https://api.github.com/users/Azwartin/gists{/gist_id}","starred_url":"https://api.github.com/users/Azwartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azwartin/subscriptions","organizations_url":"https://api.github.com/users/Azwartin/orgs","repos_url":"https://api.github.com/users/Azwartin/repos","events_url":"https://api.github.com/users/Azwartin/events{/privacy}","received_events_url":"https://api.github.com/users/Azwartin/received_events","type":"User","site_admin":false},"assignees":[{"login":"Azwartin","id":7689921,"avatar_url":"https://avatars0.githubusercontent.com/u/7689921?v=4","gravatar_id":"","url":"https://api.github.com/users/Azwartin","html_url":"https://github.com/Azwartin","followers_url":"https://api.github.com/users/Azwartin/followers","following_url":"https://api.github.com/users/Azwartin/following{/other_user}","gists_url":"https://api.github.com/users/Azwartin/gists{/gist_id}","starred_url":"https://api.github.com/users/Azwartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azwartin/subscriptions","organizations_url":"https://api.github.com/users/Azwartin/orgs","repos_url":"https://api.github.com/users/Azwartin/repos","events_url":"https://api.github.com/users/Azwartin/events{/privacy}","received_events_url":"https://api.github.com/users/Azwartin/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48/commits","review_comments_url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48/comments","review_comment_url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ZhukV/AppleApnPush/issues/48/comments","statuses_url":"https://api.github.com/repos/ZhukV/AppleApnPush/statuses/5e82a643ea84025bc931e67b2418c7eb3f48174e","head":{"label":"Azwartin:feature/jwt_authenticator_jws_update_logic","ref":"feature/jwt_authenticator_jws_update_logic","sha":"5e82a643ea84025bc931e67b2418c7eb3f48174e","user":{"login":"Azwartin","id":7689921,"avatar_url":"https://avatars0.githubusercontent.com/u/7689921?v=4","gravatar_id":"","url":"https://api.github.com/users/Azwartin","html_url":"https://github.com/Azwartin","followers_url":"https://api.github.com/users/Azwartin/followers","following_url":"https://api.github.com/users/Azwartin/following{/other_user}","gists_url":"https://api.github.com/users/Azwartin/gists{/gist_id}","starred_url":"https://api.github.com/users/Azwartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azwartin/subscriptions","organizations_url":"https://api.github.com/users/Azwartin/orgs","repos_url":"https://api.github.com/users/Azwartin/repos","events_url":"https://api.github.com/users/Azwartin/events{/privacy}","received_events_url":"https://api.github.com/users/Azwartin/received_events","type":"User","site_admin":false},"repo":{"id":114626502,"name":"AppleApnPush","full_name":"Azwartin/AppleApnPush","owner":{"login":"Azwartin","id":7689921,"avatar_url":"https://avatars0.githubusercontent.com/u/7689921?v=4","gravatar_id":"","url":"https://api.github.com/users/Azwartin","html_url":"https://github.com/Azwartin","followers_url":"https://api.github.com/users/Azwartin/followers","following_url":"https://api.github.com/users/Azwartin/following{/other_user}","gists_url":"https://api.github.com/users/Azwartin/gists{/gist_id}","starred_url":"https://api.github.com/users/Azwartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azwartin/subscriptions","organizations_url":"https://api.github.com/users/Azwartin/orgs","repos_url":"https://api.github.com/users/Azwartin/repos","events_url":"https://api.github.com/users/Azwartin/events{/privacy}","received_events_url":"https://api.github.com/users/Azwartin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Azwartin/AppleApnPush","description":"Send push notification to Apple Devices (iPhone, iPad)","fork":true,"url":"https://api.github.com/repos/Azwartin/AppleApnPush","forks_url":"https://api.github.com/repos/Azwartin/AppleApnPush/forks","keys_url":"https://api.github.com/repos/Azwartin/AppleApnPush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azwartin/AppleApnPush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azwartin/AppleApnPush/teams","hooks_url":"https://api.github.com/repos/Azwartin/AppleApnPush/hooks","issue_events_url":"https://api.github.com/repos/Azwartin/AppleApnPush/issues/events{/number}","events_url":"https://api.github.com/repos/Azwartin/AppleApnPush/events","assignees_url":"https://api.github.com/repos/Azwartin/AppleApnPush/assignees{/user}","branches_url":"https://api.github.com/repos/Azwartin/AppleApnPush/branches{/branch}","tags_url":"https://api.github.com/repos/Azwartin/AppleApnPush/tags","blobs_url":"https://api.github.com/repos/Azwartin/AppleApnPush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azwartin/AppleApnPush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azwartin/AppleApnPush/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azwartin/AppleApnPush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azwartin/AppleApnPush/statuses/{sha}","languages_url":"https://api.github.com/repos/Azwartin/AppleApnPush/languages","stargazers_url":"https://api.github.com/repos/Azwartin/AppleApnPush/stargazers","contributors_url":"https://api.github.com/repos/Azwartin/AppleApnPush/contributors","subscribers_url":"https://api.github.com/repos/Azwartin/AppleApnPush/subscribers","subscription_url":"https://api.github.com/repos/Azwartin/AppleApnPush/subscription","commits_url":"https://api.github.com/repos/Azwartin/AppleApnPush/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azwartin/AppleApnPush/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azwartin/AppleApnPush/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azwartin/AppleApnPush/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azwartin/AppleApnPush/contents/{+path}","compare_url":"https://api.github.com/repos/Azwartin/AppleApnPush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azwartin/AppleApnPush/merges","archive_url":"https://api.github.com/repos/Azwartin/AppleApnPush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azwartin/AppleApnPush/downloads","issues_url":"https://api.github.com/repos/Azwartin/AppleApnPush/issues{/number}","pulls_url":"https://api.github.com/repos/Azwartin/AppleApnPush/pulls{/number}","milestones_url":"https://api.github.com/repos/Azwartin/AppleApnPush/milestones{/number}","notifications_url":"https://api.github.com/repos/Azwartin/AppleApnPush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azwartin/AppleApnPush/labels{/name}","releases_url":"https://api.github.com/repos/Azwartin/AppleApnPush/releases{/id}","deployments_url":"https://api.github.com/repos/Azwartin/AppleApnPush/deployments","created_at":"2017-12-18T10:16:40Z","updated_at":"2017-12-18T10:16:42Z","pushed_at":"2017-12-21T14:01:14Z","git_url":"git://github.com/Azwartin/AppleApnPush.git","ssh_url":"git@github.com:Azwartin/AppleApnPush.git","clone_url":"https://github.com/Azwartin/AppleApnPush.git","svn_url":"https://github.com/Azwartin/AppleApnPush","homepage":"","size":334,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ZhukV:master","ref":"master","sha":"2f1783a7fcf0916c7519e1ef691d8c69ac925d42","user":{"login":"ZhukV","id":2256109,"avatar_url":"https://avatars2.githubusercontent.com/u/2256109?v=4","gravatar_id":"","url":"https://api.github.com/users/ZhukV","html_url":"https://github.com/ZhukV","followers_url":"https://api.github.com/users/ZhukV/followers","following_url":"https://api.github.com/users/ZhukV/following{/other_user}","gists_url":"https://api.github.com/users/ZhukV/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhukV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhukV/subscriptions","organizations_url":"https://api.github.com/users/ZhukV/orgs","repos_url":"https://api.github.com/users/ZhukV/repos","events_url":"https://api.github.com/users/ZhukV/events{/privacy}","received_events_url":"https://api.github.com/users/ZhukV/received_events","type":"User","site_admin":false},"repo":{"id":7853017,"name":"AppleApnPush","full_name":"ZhukV/AppleApnPush","owner":{"login":"ZhukV","id":2256109,"avatar_url":"https://avatars2.githubusercontent.com/u/2256109?v=4","gravatar_id":"","url":"https://api.github.com/users/ZhukV","html_url":"https://github.com/ZhukV","followers_url":"https://api.github.com/users/ZhukV/followers","following_url":"https://api.github.com/users/ZhukV/following{/other_user}","gists_url":"https://api.github.com/users/ZhukV/gists{/gist_id}","starred_url":"https://api.github.com/users/ZhukV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZhukV/subscriptions","organizations_url":"https://api.github.com/users/ZhukV/orgs","repos_url":"https://api.github.com/users/ZhukV/repos","events_url":"https://api.github.com/users/ZhukV/events{/privacy}","received_events_url":"https://api.github.com/users/ZhukV/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ZhukV/AppleApnPush","description":"Send push notification to Apple Devices (iPhone, iPad)","fork":false,"url":"https://api.github.com/repos/ZhukV/AppleApnPush","forks_url":"https://api.github.com/repos/ZhukV/AppleApnPush/forks","keys_url":"https://api.github.com/repos/ZhukV/AppleApnPush/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZhukV/AppleApnPush/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZhukV/AppleApnPush/teams","hooks_url":"https://api.github.com/repos/ZhukV/AppleApnPush/hooks","issue_events_url":"https://api.github.com/repos/ZhukV/AppleApnPush/issues/events{/number}","events_url":"https://api.github.com/repos/ZhukV/AppleApnPush/events","assignees_url":"https://api.github.com/repos/ZhukV/AppleApnPush/assignees{/user}","branches_url":"https://api.github.com/repos/ZhukV/AppleApnPush/branches{/branch}","tags_url":"https://api.github.com/repos/ZhukV/AppleApnPush/tags","blobs_url":"https://api.github.com/repos/ZhukV/AppleApnPush/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZhukV/AppleApnPush/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZhukV/AppleApnPush/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZhukV/AppleApnPush/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZhukV/AppleApnPush/statuses/{sha}","languages_url":"https://api.github.com/repos/ZhukV/AppleApnPush/languages","stargazers_url":"https://api.github.com/repos/ZhukV/AppleApnPush/stargazers","contributors_url":"https://api.github.com/repos/ZhukV/AppleApnPush/contributors","subscribers_url":"https://api.github.com/repos/ZhukV/AppleApnPush/subscribers","subscription_url":"https://api.github.com/repos/ZhukV/AppleApnPush/subscription","commits_url":"https://api.github.com/repos/ZhukV/AppleApnPush/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZhukV/AppleApnPush/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZhukV/AppleApnPush/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZhukV/AppleApnPush/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZhukV/AppleApnPush/contents/{+path}","compare_url":"https://api.github.com/repos/ZhukV/AppleApnPush/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZhukV/AppleApnPush/merges","archive_url":"https://api.github.com/repos/ZhukV/AppleApnPush/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZhukV/AppleApnPush/downloads","issues_url":"https://api.github.com/repos/ZhukV/AppleApnPush/issues{/number}","pulls_url":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls{/number}","milestones_url":"https://api.github.com/repos/ZhukV/AppleApnPush/milestones{/number}","notifications_url":"https://api.github.com/repos/ZhukV/AppleApnPush/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZhukV/AppleApnPush/labels{/name}","releases_url":"https://api.github.com/repos/ZhukV/AppleApnPush/releases{/id}","deployments_url":"https://api.github.com/repos/ZhukV/AppleApnPush/deployments","created_at":"2013-01-27T14:19:21Z","updated_at":"2017-11-21T06:37:04Z","pushed_at":"2017-12-21T14:01:15Z","git_url":"git://github.com/ZhukV/AppleApnPush.git","ssh_url":"git@github.com:ZhukV/AppleApnPush.git","clone_url":"https://github.com/ZhukV/AppleApnPush.git","svn_url":"https://github.com/ZhukV/AppleApnPush","homepage":"","size":331,"stargazers_count":90,"watchers_count":90,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":21,"open_issues":3,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48"},"html":{"href":"https://github.com/ZhukV/AppleApnPush/pull/48"},"issue":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/issues/48"},"comments":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/ZhukV/AppleApnPush/statuses/5e82a643ea84025bc931e67b2418c7eb3f48174e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ZhukV"}}