{"action":"created","comment":{"url":"https://api.github.com/repos/cbdr/pencilblue/pulls/comments/35697182","id":35697182,"diff_hunk":"@@ -0,0 +1,88 @@\n+/*\n+ Copyright (C) 2015  PencilBlue, LLC\n+\n+ This program is free software: you can redistribute it and/or modify\n+ it under the terms of the GNU General Public License as published by\n+ the Free Software Foundation, either version 3 of the License, or\n+ (at your option) any later version.\n+\n+ This program is distributed in the hope that it will be useful,\n+ but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ GNU General Public License for more details.\n+\n+ You should have received a copy of the GNU General Public License\n+ along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+module.exports = function TokenServiceModule(pb) {\n+\n+    //dependencies\n+    var crypto = require('crypto');\n+    var util = pb.util;\n+\n+    /**\n+     * A service that manages tokens for non-password authentication.\n+     *\n+     * @class TokenService\n+     * @constructor\n+     * @module Services\n+     * @submodule Entities\n+     */","path":"include/service/entities/token_service.js","position":31,"original_position":31,"commit_id":"8bd50ad7b33710017ed824c43b8807251392a114","original_commit_id":"8bd50ad7b33710017ed824c43b8807251392a114","user":{"login":"andparker","id":7945957,"avatar_url":"https://avatars.githubusercontent.com/u/7945957?v=3","gravatar_id":"","url":"https://api.github.com/users/andparker","html_url":"https://github.com/andparker","followers_url":"https://api.github.com/users/andparker/followers","following_url":"https://api.github.com/users/andparker/following{/other_user}","gists_url":"https://api.github.com/users/andparker/gists{/gist_id}","starred_url":"https://api.github.com/users/andparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andparker/subscriptions","organizations_url":"https://api.github.com/users/andparker/orgs","repos_url":"https://api.github.com/users/andparker/repos","events_url":"https://api.github.com/users/andparker/events{/privacy}","received_events_url":"https://api.github.com/users/andparker/received_events","type":"User","site_admin":false},"body":"Sorry, the last one is of type {String}, actually.","created_at":"2015-07-28T20:35:14Z","updated_at":"2015-07-28T20:35:14Z","html_url":"https://github.com/cbdr/pencilblue/pull/126#discussion_r35697182","pull_request_url":"https://api.github.com/repos/cbdr/pencilblue/pulls/126","_links":{"self":{"href":"https://api.github.com/repos/cbdr/pencilblue/pulls/comments/35697182"},"html":{"href":"https://github.com/cbdr/pencilblue/pull/126#discussion_r35697182"},"pull_request":{"href":"https://api.github.com/repos/cbdr/pencilblue/pulls/126"}}},"pull_request":{"url":"https://api.github.com/repos/cbdr/pencilblue/pulls/126","id":41056118,"html_url":"https://github.com/cbdr/pencilblue/pull/126","diff_url":"https://github.com/cbdr/pencilblue/pull/126.diff","patch_url":"https://github.com/cbdr/pencilblue/pull/126.patch","issue_url":"https://api.github.com/repos/cbdr/pencilblue/issues/126","number":126,"state":"open","locked":false,"title":"Multisite tokens","user":{"login":"btidwell","id":2204439,"avatar_url":"https://avatars.githubusercontent.com/u/2204439?v=3","gravatar_id":"","url":"https://api.github.com/users/btidwell","html_url":"https://github.com/btidwell","followers_url":"https://api.github.com/users/btidwell/followers","following_url":"https://api.github.com/users/btidwell/following{/other_user}","gists_url":"https://api.github.com/users/btidwell/gists{/gist_id}","starred_url":"https://api.github.com/users/btidwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btidwell/subscriptions","organizations_url":"https://api.github.com/users/btidwell/orgs","repos_url":"https://api.github.com/users/btidwell/repos","events_url":"https://api.github.com/users/btidwell/events{/privacy}","received_events_url":"https://api.github.com/users/btidwell/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-28T20:24:37Z","updated_at":"2015-07-28T20:35:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"294b99deee3cf1626c5fecfda3c47949b7ea1e6c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cbdr/pencilblue/pulls/126/commits","review_comments_url":"https://api.github.com/repos/cbdr/pencilblue/pulls/126/comments","review_comment_url":"https://api.github.com/repos/cbdr/pencilblue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbdr/pencilblue/issues/126/comments","statuses_url":"https://api.github.com/repos/cbdr/pencilblue/statuses/8bd50ad7b33710017ed824c43b8807251392a114","head":{"label":"cbdr:multisite_tokens","ref":"multisite_tokens","sha":"8bd50ad7b33710017ed824c43b8807251392a114","user":{"login":"cbdr","id":1764768,"avatar_url":"https://avatars.githubusercontent.com/u/1764768?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdr","html_url":"https://github.com/cbdr","followers_url":"https://api.github.com/users/cbdr/followers","following_url":"https://api.github.com/users/cbdr/following{/other_user}","gists_url":"https://api.github.com/users/cbdr/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdr/subscriptions","organizations_url":"https://api.github.com/users/cbdr/orgs","repos_url":"https://api.github.com/users/cbdr/repos","events_url":"https://api.github.com/users/cbdr/events{/privacy}","received_events_url":"https://api.github.com/users/cbdr/received_events","type":"Organization","site_admin":false},"repo":{"id":33883805,"name":"pencilblue","full_name":"cbdr/pencilblue","owner":{"login":"cbdr","id":1764768,"avatar_url":"https://avatars.githubusercontent.com/u/1764768?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdr","html_url":"https://github.com/cbdr","followers_url":"https://api.github.com/users/cbdr/followers","following_url":"https://api.github.com/users/cbdr/following{/other_user}","gists_url":"https://api.github.com/users/cbdr/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdr/subscriptions","organizations_url":"https://api.github.com/users/cbdr/orgs","repos_url":"https://api.github.com/users/cbdr/repos","events_url":"https://api.github.com/users/cbdr/events{/privacy}","received_events_url":"https://api.github.com/users/cbdr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cbdr/pencilblue","description":"A full featured Node.js CMS and blogging platform (plugins, server cluster management, data-driven pages)","fork":true,"url":"https://api.github.com/repos/cbdr/pencilblue","forks_url":"https://api.github.com/repos/cbdr/pencilblue/forks","keys_url":"https://api.github.com/repos/cbdr/pencilblue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbdr/pencilblue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbdr/pencilblue/teams","hooks_url":"https://api.github.com/repos/cbdr/pencilblue/hooks","issue_events_url":"https://api.github.com/repos/cbdr/pencilblue/issues/events{/number}","events_url":"https://api.github.com/repos/cbdr/pencilblue/events","assignees_url":"https://api.github.com/repos/cbdr/pencilblue/assignees{/user}","branches_url":"https://api.github.com/repos/cbdr/pencilblue/branches{/branch}","tags_url":"https://api.github.com/repos/cbdr/pencilblue/tags","blobs_url":"https://api.github.com/repos/cbdr/pencilblue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbdr/pencilblue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbdr/pencilblue/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbdr/pencilblue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbdr/pencilblue/statuses/{sha}","languages_url":"https://api.github.com/repos/cbdr/pencilblue/languages","stargazers_url":"https://api.github.com/repos/cbdr/pencilblue/stargazers","contributors_url":"https://api.github.com/repos/cbdr/pencilblue/contributors","subscribers_url":"https://api.github.com/repos/cbdr/pencilblue/subscribers","subscription_url":"https://api.github.com/repos/cbdr/pencilblue/subscription","commits_url":"https://api.github.com/repos/cbdr/pencilblue/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbdr/pencilblue/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbdr/pencilblue/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbdr/pencilblue/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbdr/pencilblue/contents/{+path}","compare_url":"https://api.github.com/repos/cbdr/pencilblue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbdr/pencilblue/merges","archive_url":"https://api.github.com/repos/cbdr/pencilblue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbdr/pencilblue/downloads","issues_url":"https://api.github.com/repos/cbdr/pencilblue/issues{/number}","pulls_url":"https://api.github.com/repos/cbdr/pencilblue/pulls{/number}","milestones_url":"https://api.github.com/repos/cbdr/pencilblue/milestones{/number}","notifications_url":"https://api.github.com/repos/cbdr/pencilblue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbdr/pencilblue/labels{/name}","releases_url":"https://api.github.com/repos/cbdr/pencilblue/releases{/id}","created_at":"2015-04-13T17:43:36Z","updated_at":"2015-05-04T18:06:29Z","pushed_at":"2015-07-28T20:30:27Z","git_url":"git://github.com/cbdr/pencilblue.git","ssh_url":"git@github.com:cbdr/pencilblue.git","clone_url":"https://github.com/cbdr/pencilblue.git","svn_url":"https://github.com/cbdr/pencilblue","homepage":"https://pencilblue.org","size":14337,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"cbdr:0.5.0","ref":"0.5.0","sha":"693400c039c52209c6e3b33b6a003524ff6b61a1","user":{"login":"cbdr","id":1764768,"avatar_url":"https://avatars.githubusercontent.com/u/1764768?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdr","html_url":"https://github.com/cbdr","followers_url":"https://api.github.com/users/cbdr/followers","following_url":"https://api.github.com/users/cbdr/following{/other_user}","gists_url":"https://api.github.com/users/cbdr/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdr/subscriptions","organizations_url":"https://api.github.com/users/cbdr/orgs","repos_url":"https://api.github.com/users/cbdr/repos","events_url":"https://api.github.com/users/cbdr/events{/privacy}","received_events_url":"https://api.github.com/users/cbdr/received_events","type":"Organization","site_admin":false},"repo":{"id":33883805,"name":"pencilblue","full_name":"cbdr/pencilblue","owner":{"login":"cbdr","id":1764768,"avatar_url":"https://avatars.githubusercontent.com/u/1764768?v=3","gravatar_id":"","url":"https://api.github.com/users/cbdr","html_url":"https://github.com/cbdr","followers_url":"https://api.github.com/users/cbdr/followers","following_url":"https://api.github.com/users/cbdr/following{/other_user}","gists_url":"https://api.github.com/users/cbdr/gists{/gist_id}","starred_url":"https://api.github.com/users/cbdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbdr/subscriptions","organizations_url":"https://api.github.com/users/cbdr/orgs","repos_url":"https://api.github.com/users/cbdr/repos","events_url":"https://api.github.com/users/cbdr/events{/privacy}","received_events_url":"https://api.github.com/users/cbdr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cbdr/pencilblue","description":"A full featured Node.js CMS and blogging platform (plugins, server cluster management, data-driven pages)","fork":true,"url":"https://api.github.com/repos/cbdr/pencilblue","forks_url":"https://api.github.com/repos/cbdr/pencilblue/forks","keys_url":"https://api.github.com/repos/cbdr/pencilblue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbdr/pencilblue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbdr/pencilblue/teams","hooks_url":"https://api.github.com/repos/cbdr/pencilblue/hooks","issue_events_url":"https://api.github.com/repos/cbdr/pencilblue/issues/events{/number}","events_url":"https://api.github.com/repos/cbdr/pencilblue/events","assignees_url":"https://api.github.com/repos/cbdr/pencilblue/assignees{/user}","branches_url":"https://api.github.com/repos/cbdr/pencilblue/branches{/branch}","tags_url":"https://api.github.com/repos/cbdr/pencilblue/tags","blobs_url":"https://api.github.com/repos/cbdr/pencilblue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbdr/pencilblue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbdr/pencilblue/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbdr/pencilblue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbdr/pencilblue/statuses/{sha}","languages_url":"https://api.github.com/repos/cbdr/pencilblue/languages","stargazers_url":"https://api.github.com/repos/cbdr/pencilblue/stargazers","contributors_url":"https://api.github.com/repos/cbdr/pencilblue/contributors","subscribers_url":"https://api.github.com/repos/cbdr/pencilblue/subscribers","subscription_url":"https://api.github.com/repos/cbdr/pencilblue/subscription","commits_url":"https://api.github.com/repos/cbdr/pencilblue/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbdr/pencilblue/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbdr/pencilblue/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbdr/pencilblue/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbdr/pencilblue/contents/{+path}","compare_url":"https://api.github.com/repos/cbdr/pencilblue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbdr/pencilblue/merges","archive_url":"https://api.github.com/repos/cbdr/pencilblue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbdr/pencilblue/downloads","issues_url":"https://api.github.com/repos/cbdr/pencilblue/issues{/number}","pulls_url":"https://api.github.com/repos/cbdr/pencilblue/pulls{/number}","milestones_url":"https://api.github.com/repos/cbdr/pencilblue/milestones{/number}","notifications_url":"https://api.github.com/repos/cbdr/pencilblue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbdr/pencilblue/labels{/name}","releases_url":"https://api.github.com/repos/cbdr/pencilblue/releases{/id}","created_at":"2015-04-13T17:43:36Z","updated_at":"2015-05-04T18:06:29Z","pushed_at":"2015-07-28T20:30:27Z","git_url":"git://github.com/cbdr/pencilblue.git","ssh_url":"git@github.com:cbdr/pencilblue.git","clone_url":"https://github.com/cbdr/pencilblue.git","svn_url":"https://github.com/cbdr/pencilblue","homepage":"https://pencilblue.org","size":14337,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbdr/pencilblue/pulls/126"},"html":{"href":"https://github.com/cbdr/pencilblue/pull/126"},"issue":{"href":"https://api.github.com/repos/cbdr/pencilblue/issues/126"},"comments":{"href":"https://api.github.com/repos/cbdr/pencilblue/issues/126/comments"},"review_comments":{"href":"https://api.github.com/repos/cbdr/pencilblue/pulls/126/comments"},"review_comment":{"href":"https://api.github.com/repos/cbdr/pencilblue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbdr/pencilblue/pulls/126/commits"},"statuses":{"href":"https://api.github.com/repos/cbdr/pencilblue/statuses/8bd50ad7b33710017ed824c43b8807251392a114"}}}}