{"action":"created","comment":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/201510247","pull_request_review_id":136020923,"id":201510247,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTUxMDI0Nw==","diff_hunk":"@@ -0,0 +1,23 @@\n+<?php\n+/**\n+ * @author Chris Chabilall <chris.c@vanillaforums.com>\n+ * @copyright 2009-2018 Vanilla Forums Inc.\n+ * @license http://www.opensource.org/licenses/gpl-2.0.php GNU GPL v2\n+ */\n+\n+namespace VanillaTests\\Fixtures;\n+\n+use Vanilla\\TokenSigningTrait;\n+\n+class TokenTestingModel {\n+\n+    use TokenSigningTrait;\n+\n+    /**\n+     * TokenModel constructor.\n+     */\n+    public function __construct() {\n+        $this->setSecret('sss');\n+        $this->tokenIdentifier ='nonce';","path":"tests/fixtures/src/TokenTestingModel.php","position":21,"original_position":21,"commit_id":"6b38812b8887e4fcbdfc313fdfd387e3a09f703e","original_commit_id":"6b38812b8887e4fcbdfc313fdfd387e3a09f703e","user":{"login":"initvector","id":1390241,"node_id":"MDQ6VXNlcjEzOTAyNDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1390241?v=4","gravatar_id":"","url":"https://api.github.com/users/initvector","html_url":"https://github.com/initvector","followers_url":"https://api.github.com/users/initvector/followers","following_url":"https://api.github.com/users/initvector/following{/other_user}","gists_url":"https://api.github.com/users/initvector/gists{/gist_id}","starred_url":"https://api.github.com/users/initvector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/initvector/subscriptions","organizations_url":"https://api.github.com/users/initvector/orgs","repos_url":"https://api.github.com/users/initvector/repos","events_url":"https://api.github.com/users/initvector/events{/privacy}","received_events_url":"https://api.github.com/users/initvector/received_events","type":"User","site_admin":false},"body":"⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️\r\n⬜️😭😭😭⬜️😭😭😭⬜️😭😭😭⬜️😭😭😭⬜️😭😭😭⬜️\r\n⬜️😭⬜️⬜️⬜️😭⬜️😭⬜️😭👾😭⬜️😭⬜️⬜️⬜️😭⬜️⬜️⬜️\r\n⬜️😭😭😭⬜️😭😭😭⬜️😭😭😭⬜️😭⬜️⬜️⬜️😭😭😭⬜️\r\n⬜️⬜️⬜️😭⬜️😭⬜️⬜️⬜️😭⬜️😭⬜️😭⬜️⬜️⬜️😭⬜️⬜️⬜️\r\n⬜️😭😭😭⬜️😭⬜️⬜️⬜️😭⬜️😭⬜️😭😭😭⬜️😭😭😭⬜️\r\n⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️⬜️","created_at":"2018-07-10T22:03:36Z","updated_at":"2018-07-10T22:03:51Z","html_url":"https://github.com/vanilla/vanilla/pull/7441#discussion_r201510247","pull_request_url":"https://api.github.com/repos/vanilla/vanilla/pulls/7441","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments/201510247"},"html":{"href":"https://github.com/vanilla/vanilla/pull/7441#discussion_r201510247"},"pull_request":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/7441"}}},"pull_request":{"url":"https://api.github.com/repos/vanilla/vanilla/pulls/7441","id":200170268,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMTcwMjY4","html_url":"https://github.com/vanilla/vanilla/pull/7441","diff_url":"https://github.com/vanilla/vanilla/pull/7441.diff","patch_url":"https://github.com/vanilla/vanilla/pull/7441.patch","issue_url":"https://api.github.com/repos/vanilla/vanilla/issues/7441","number":7441,"state":"open","locked":false,"title":"Add Token Signing Trait and UserAuthenticationNonceModel functionality","user":{"login":"cchabilall83","id":36996270,"node_id":"MDQ6VXNlcjM2OTk2Mjcw","avatar_url":"https://avatars0.githubusercontent.com/u/36996270?v=4","gravatar_id":"","url":"https://api.github.com/users/cchabilall83","html_url":"https://github.com/cchabilall83","followers_url":"https://api.github.com/users/cchabilall83/followers","following_url":"https://api.github.com/users/cchabilall83/following{/other_user}","gists_url":"https://api.github.com/users/cchabilall83/gists{/gist_id}","starred_url":"https://api.github.com/users/cchabilall83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cchabilall83/subscriptions","organizations_url":"https://api.github.com/users/cchabilall83/orgs","repos_url":"https://api.github.com/users/cchabilall83/repos","events_url":"https://api.github.com/users/cchabilall83/events{/privacy}","received_events_url":"https://api.github.com/users/cchabilall83/received_events","type":"User","site_admin":false},"body":"The Token Signing trait consists of utility methods that are shared across the **AccessTokenModel** and **UserAuthenticationNonceModel**.  The methods (see below) were extracted from the AccessTokenModel.  There was more functionality added to the UserAuthenticationNonceModel as well, this includes the **update**, **getNonce**, **issue**, **consume** an **verify** methods.\r\n\r\nAdditionally the TokenModel fixture was created to unit test the the newly created trait with the TokenSigningTests class.  UserAuthenticationNonceModelTest class  was created to test the UserAuthenticationNonceModel and AccessTokenModelTest class was modify to account for the changes made.\r\n\r\nMethods Extracted from AccessTokenModel\r\n\r\n- secret (variable)\r\n- getSecret\r\n- setSecret\r\n- base64urlEncode\r\n- base64urlDecode\r\n- randomToken\r\n- verifyTokenSignature\r\n- signToken\r\n- tokenError\r\n\r\n**These were not listed in the issue but I notice there were used by the extracted methods.**\r\n\r\n- toTimestamp\r\n- encodeDate\r\n- decodeDate\r\n\r\nCloses Vanilla#7402\r\n","created_at":"2018-07-09T17:35:25Z","updated_at":"2018-07-10T22:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3900f2de48bbb1a77b40bd3e37802e85d52e1a42","assignee":{"login":"initvector","id":1390241,"node_id":"MDQ6VXNlcjEzOTAyNDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1390241?v=4","gravatar_id":"","url":"https://api.github.com/users/initvector","html_url":"https://github.com/initvector","followers_url":"https://api.github.com/users/initvector/followers","following_url":"https://api.github.com/users/initvector/following{/other_user}","gists_url":"https://api.github.com/users/initvector/gists{/gist_id}","starred_url":"https://api.github.com/users/initvector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/initvector/subscriptions","organizations_url":"https://api.github.com/users/initvector/orgs","repos_url":"https://api.github.com/users/initvector/repos","events_url":"https://api.github.com/users/initvector/events{/privacy}","received_events_url":"https://api.github.com/users/initvector/received_events","type":"User","site_admin":false},"assignees":[{"login":"initvector","id":1390241,"node_id":"MDQ6VXNlcjEzOTAyNDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1390241?v=4","gravatar_id":"","url":"https://api.github.com/users/initvector","html_url":"https://github.com/initvector","followers_url":"https://api.github.com/users/initvector/followers","following_url":"https://api.github.com/users/initvector/following{/other_user}","gists_url":"https://api.github.com/users/initvector/gists{/gist_id}","starred_url":"https://api.github.com/users/initvector/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/initvector/subscriptions","organizations_url":"https://api.github.com/users/initvector/orgs","repos_url":"https://api.github.com/users/initvector/repos","events_url":"https://api.github.com/users/initvector/events{/privacy}","received_events_url":"https://api.github.com/users/initvector/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/vanilla/vanilla/milestones/82","html_url":"https://github.com/vanilla/vanilla/milestone/82","labels_url":"https://api.github.com/repos/vanilla/vanilla/milestones/82/labels","id":3457022,"node_id":"MDk6TWlsZXN0b25lMzQ1NzAyMg==","number":82,"title":"2018-07-11","description":"","creator":{"login":"linc","id":117672,"node_id":"MDQ6VXNlcjExNzY3Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/117672?v=4","gravatar_id":"","url":"https://api.github.com/users/linc","html_url":"https://github.com/linc","followers_url":"https://api.github.com/users/linc/followers","following_url":"https://api.github.com/users/linc/following{/other_user}","gists_url":"https://api.github.com/users/linc/gists{/gist_id}","starred_url":"https://api.github.com/users/linc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linc/subscriptions","organizations_url":"https://api.github.com/users/linc/orgs","repos_url":"https://api.github.com/users/linc/repos","events_url":"https://api.github.com/users/linc/events{/privacy}","received_events_url":"https://api.github.com/users/linc/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":18,"state":"open","created_at":"2018-06-27T17:54:26Z","updated_at":"2018-07-10T21:33:49Z","due_on":"2018-07-11T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/vanilla/vanilla/pulls/7441/commits","review_comments_url":"https://api.github.com/repos/vanilla/vanilla/pulls/7441/comments","review_comment_url":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vanilla/vanilla/issues/7441/comments","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/6b38812b8887e4fcbdfc313fdfd387e3a09f703e","head":{"label":"vanilla:feature/token-signing-trait","ref":"feature/token-signing-trait","sha":"6b38812b8887e4fcbdfc313fdfd387e3a09f703e","user":{"login":"vanilla","id":7443552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0NDM1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"node_id":"MDEwOlJlcG9zaXRvcnkyMzIzOTA=","name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0NDM1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2018-07-10T21:33:56Z","pushed_at":"2018-07-10T21:33:50Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":79098,"stargazers_count":1831,"watchers_count":1831,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":649,"mirror_url":null,"archived":false,"open_issues_count":605,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":649,"open_issues":605,"watchers":1831,"default_branch":"master"}},"base":{"label":"vanilla:master","ref":"master","sha":"72db94706cfb76532ffb2b587a95a18f5239a8e3","user":{"login":"vanilla","id":7443552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0NDM1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"repo":{"id":232390,"node_id":"MDEwOlJlcG9zaXRvcnkyMzIzOTA=","name":"vanilla","full_name":"vanilla/vanilla","owner":{"login":"vanilla","id":7443552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc0NDM1NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7443552?v=4","gravatar_id":"","url":"https://api.github.com/users/vanilla","html_url":"https://github.com/vanilla","followers_url":"https://api.github.com/users/vanilla/followers","following_url":"https://api.github.com/users/vanilla/following{/other_user}","gists_url":"https://api.github.com/users/vanilla/gists{/gist_id}","starred_url":"https://api.github.com/users/vanilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanilla/subscriptions","organizations_url":"https://api.github.com/users/vanilla/orgs","repos_url":"https://api.github.com/users/vanilla/repos","events_url":"https://api.github.com/users/vanilla/events{/privacy}","received_events_url":"https://api.github.com/users/vanilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vanilla/vanilla","description":"Vanilla is a powerfully simple discussion forum you can easily customize to make as unique as your community.","fork":false,"url":"https://api.github.com/repos/vanilla/vanilla","forks_url":"https://api.github.com/repos/vanilla/vanilla/forks","keys_url":"https://api.github.com/repos/vanilla/vanilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vanilla/vanilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vanilla/vanilla/teams","hooks_url":"https://api.github.com/repos/vanilla/vanilla/hooks","issue_events_url":"https://api.github.com/repos/vanilla/vanilla/issues/events{/number}","events_url":"https://api.github.com/repos/vanilla/vanilla/events","assignees_url":"https://api.github.com/repos/vanilla/vanilla/assignees{/user}","branches_url":"https://api.github.com/repos/vanilla/vanilla/branches{/branch}","tags_url":"https://api.github.com/repos/vanilla/vanilla/tags","blobs_url":"https://api.github.com/repos/vanilla/vanilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vanilla/vanilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vanilla/vanilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/vanilla/vanilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vanilla/vanilla/statuses/{sha}","languages_url":"https://api.github.com/repos/vanilla/vanilla/languages","stargazers_url":"https://api.github.com/repos/vanilla/vanilla/stargazers","contributors_url":"https://api.github.com/repos/vanilla/vanilla/contributors","subscribers_url":"https://api.github.com/repos/vanilla/vanilla/subscribers","subscription_url":"https://api.github.com/repos/vanilla/vanilla/subscription","commits_url":"https://api.github.com/repos/vanilla/vanilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/vanilla/vanilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/vanilla/vanilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/vanilla/vanilla/issues/comments{/number}","contents_url":"https://api.github.com/repos/vanilla/vanilla/contents/{+path}","compare_url":"https://api.github.com/repos/vanilla/vanilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vanilla/vanilla/merges","archive_url":"https://api.github.com/repos/vanilla/vanilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vanilla/vanilla/downloads","issues_url":"https://api.github.com/repos/vanilla/vanilla/issues{/number}","pulls_url":"https://api.github.com/repos/vanilla/vanilla/pulls{/number}","milestones_url":"https://api.github.com/repos/vanilla/vanilla/milestones{/number}","notifications_url":"https://api.github.com/repos/vanilla/vanilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vanilla/vanilla/labels{/name}","releases_url":"https://api.github.com/repos/vanilla/vanilla/releases{/id}","deployments_url":"https://api.github.com/repos/vanilla/vanilla/deployments","created_at":"2009-06-21T01:41:25Z","updated_at":"2018-07-10T21:33:56Z","pushed_at":"2018-07-10T21:33:50Z","git_url":"git://github.com/vanilla/vanilla.git","ssh_url":"git@github.com:vanilla/vanilla.git","clone_url":"https://github.com/vanilla/vanilla.git","svn_url":"https://github.com/vanilla/vanilla","homepage":"https://open.vanillaforums.com","size":79098,"stargazers_count":1831,"watchers_count":1831,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":649,"mirror_url":null,"archived":false,"open_issues_count":605,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":649,"open_issues":605,"watchers":1831,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/7441"},"html":{"href":"https://github.com/vanilla/vanilla/pull/7441"},"issue":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/7441"},"comments":{"href":"https://api.github.com/repos/vanilla/vanilla/issues/7441/comments"},"review_comments":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/7441/comments"},"review_comment":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vanilla/vanilla/pulls/7441/commits"},"statuses":{"href":"https://api.github.com/repos/vanilla/vanilla/statuses/6b38812b8887e4fcbdfc313fdfd387e3a09f703e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"initvector"}}