{"action":"created","comment":{"url":"https://api.github.com/repos/mammonbank/webapp/pulls/comments/44213212","id":44213212,"diff_hunk":"@@ -47,14 +50,39 @@ router.post('/', function(req, res, next) {\n         .create({\n             firstName: req.body.firstName,\n             lastName: req.body.lastName,\n+            patronymic: req.body.patronymic,\n+            dateOfBirth: req.body.dateOfBirth,\n+            phoneNumber: req.body.phoneNumber,\n             email: req.body.email,\n             password: req.body.password,\n-            phoneNumber: req.body.phoneNumber\n+            passportNumber: req.body.passportNumber,\n+            passportIdNumber: req.body.passportIdNumber,\n+            mothersMaidenName: req.body.mothersMaidenName\n         })\n         .then(function(client) {\n-            res.json({\n-                clientId: client.id\n+            var key = speakeasy.generate_key({\n+                length: 20,\n+                symbols: true,\n+                qr_codes: true,\n+                google_auth_qr: true,\n+                name: 'mammonbank'\n             });\n+            \n+            client.set('secret', key.base32);\n+            client.save()","path":"api/controllers/clients.js","position":38,"original_position":38,"commit_id":"c0bd686709d9eb9519d1ff24ccc6e0ea590c72c3","original_commit_id":"c0bd686709d9eb9519d1ff24ccc6e0ea590c72c3","user":{"login":"wiranoid","id":10433437,"avatar_url":"https://avatars.githubusercontent.com/u/10433437?v=3","gravatar_id":"","url":"https://api.github.com/users/wiranoid","html_url":"https://github.com/wiranoid","followers_url":"https://api.github.com/users/wiranoid/followers","following_url":"https://api.github.com/users/wiranoid/following{/other_user}","gists_url":"https://api.github.com/users/wiranoid/gists{/gist_id}","starred_url":"https://api.github.com/users/wiranoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiranoid/subscriptions","organizations_url":"https://api.github.com/users/wiranoid/orgs","repos_url":"https://api.github.com/users/wiranoid/repos","events_url":"https://api.github.com/users/wiranoid/events{/privacy}","received_events_url":"https://api.github.com/users/wiranoid/received_events","type":"User","site_admin":false},"body":"ок","created_at":"2015-11-07T15:13:52Z","updated_at":"2015-11-07T15:13:52Z","html_url":"https://github.com/mammonbank/webapp/pull/14#discussion_r44213212","pull_request_url":"https://api.github.com/repos/mammonbank/webapp/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/mammonbank/webapp/pulls/comments/44213212"},"html":{"href":"https://github.com/mammonbank/webapp/pull/14#discussion_r44213212"},"pull_request":{"href":"https://api.github.com/repos/mammonbank/webapp/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/mammonbank/webapp/pulls/14","id":50036681,"html_url":"https://github.com/mammonbank/webapp/pull/14","diff_url":"https://github.com/mammonbank/webapp/pull/14.diff","patch_url":"https://github.com/mammonbank/webapp/pull/14.patch","issue_url":"https://api.github.com/repos/mammonbank/webapp/issues/14","number":14,"state":"open","locked":false,"title":"Two-factor authentication","user":{"login":"wiranoid","id":10433437,"avatar_url":"https://avatars.githubusercontent.com/u/10433437?v=3","gravatar_id":"","url":"https://api.github.com/users/wiranoid","html_url":"https://github.com/wiranoid","followers_url":"https://api.github.com/users/wiranoid/followers","following_url":"https://api.github.com/users/wiranoid/following{/other_user}","gists_url":"https://api.github.com/users/wiranoid/gists{/gist_id}","starred_url":"https://api.github.com/users/wiranoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wiranoid/subscriptions","organizations_url":"https://api.github.com/users/wiranoid/orgs","repos_url":"https://api.github.com/users/wiranoid/repos","events_url":"https://api.github.com/users/wiranoid/events{/privacy}","received_events_url":"https://api.github.com/users/wiranoid/received_events","type":"User","site_admin":false},"body":"Необходим google authenticator на телефоне.","created_at":"2015-11-07T14:04:07Z","updated_at":"2015-11-07T15:13:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6e22f9c46977e796b98f8ca11080887dcf34b91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mammonbank/webapp/pulls/14/commits","review_comments_url":"https://api.github.com/repos/mammonbank/webapp/pulls/14/comments","review_comment_url":"https://api.github.com/repos/mammonbank/webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mammonbank/webapp/issues/14/comments","statuses_url":"https://api.github.com/repos/mammonbank/webapp/statuses/c0bd686709d9eb9519d1ff24ccc6e0ea590c72c3","head":{"label":"mammonbank:2fa","ref":"2fa","sha":"c0bd686709d9eb9519d1ff24ccc6e0ea590c72c3","user":{"login":"mammonbank","id":14621580,"avatar_url":"https://avatars.githubusercontent.com/u/14621580?v=3","gravatar_id":"","url":"https://api.github.com/users/mammonbank","html_url":"https://github.com/mammonbank","followers_url":"https://api.github.com/users/mammonbank/followers","following_url":"https://api.github.com/users/mammonbank/following{/other_user}","gists_url":"https://api.github.com/users/mammonbank/gists{/gist_id}","starred_url":"https://api.github.com/users/mammonbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mammonbank/subscriptions","organizations_url":"https://api.github.com/users/mammonbank/orgs","repos_url":"https://api.github.com/users/mammonbank/repos","events_url":"https://api.github.com/users/mammonbank/events{/privacy}","received_events_url":"https://api.github.com/users/mammonbank/received_events","type":"Organization","site_admin":false},"repo":{"id":43126588,"name":"webapp","full_name":"mammonbank/webapp","owner":{"login":"mammonbank","id":14621580,"avatar_url":"https://avatars.githubusercontent.com/u/14621580?v=3","gravatar_id":"","url":"https://api.github.com/users/mammonbank","html_url":"https://github.com/mammonbank","followers_url":"https://api.github.com/users/mammonbank/followers","following_url":"https://api.github.com/users/mammonbank/following{/other_user}","gists_url":"https://api.github.com/users/mammonbank/gists{/gist_id}","starred_url":"https://api.github.com/users/mammonbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mammonbank/subscriptions","organizations_url":"https://api.github.com/users/mammonbank/orgs","repos_url":"https://api.github.com/users/mammonbank/repos","events_url":"https://api.github.com/users/mammonbank/events{/privacy}","received_events_url":"https://api.github.com/users/mammonbank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mammonbank/webapp","description":"Modern web-based application which simulates real banking operations","fork":false,"url":"https://api.github.com/repos/mammonbank/webapp","forks_url":"https://api.github.com/repos/mammonbank/webapp/forks","keys_url":"https://api.github.com/repos/mammonbank/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mammonbank/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mammonbank/webapp/teams","hooks_url":"https://api.github.com/repos/mammonbank/webapp/hooks","issue_events_url":"https://api.github.com/repos/mammonbank/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/mammonbank/webapp/events","assignees_url":"https://api.github.com/repos/mammonbank/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/mammonbank/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/mammonbank/webapp/tags","blobs_url":"https://api.github.com/repos/mammonbank/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mammonbank/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mammonbank/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mammonbank/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mammonbank/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/mammonbank/webapp/languages","stargazers_url":"https://api.github.com/repos/mammonbank/webapp/stargazers","contributors_url":"https://api.github.com/repos/mammonbank/webapp/contributors","subscribers_url":"https://api.github.com/repos/mammonbank/webapp/subscribers","subscription_url":"https://api.github.com/repos/mammonbank/webapp/subscription","commits_url":"https://api.github.com/repos/mammonbank/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mammonbank/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mammonbank/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mammonbank/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mammonbank/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/mammonbank/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mammonbank/webapp/merges","archive_url":"https://api.github.com/repos/mammonbank/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mammonbank/webapp/downloads","issues_url":"https://api.github.com/repos/mammonbank/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/mammonbank/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/mammonbank/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/mammonbank/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mammonbank/webapp/labels{/name}","releases_url":"https://api.github.com/repos/mammonbank/webapp/releases{/id}","created_at":"2015-09-25T09:19:19Z","updated_at":"2015-11-07T14:31:27Z","pushed_at":"2015-11-07T14:04:07Z","git_url":"git://github.com/mammonbank/webapp.git","ssh_url":"git@github.com:mammonbank/webapp.git","clone_url":"https://github.com/mammonbank/webapp.git","svn_url":"https://github.com/mammonbank/webapp","homepage":null,"size":372,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":3,"default_branch":"master"}},"base":{"label":"mammonbank:master","ref":"master","sha":"1c8bfc50b2e6bf2ab95d253d0e44ac033e9306b5","user":{"login":"mammonbank","id":14621580,"avatar_url":"https://avatars.githubusercontent.com/u/14621580?v=3","gravatar_id":"","url":"https://api.github.com/users/mammonbank","html_url":"https://github.com/mammonbank","followers_url":"https://api.github.com/users/mammonbank/followers","following_url":"https://api.github.com/users/mammonbank/following{/other_user}","gists_url":"https://api.github.com/users/mammonbank/gists{/gist_id}","starred_url":"https://api.github.com/users/mammonbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mammonbank/subscriptions","organizations_url":"https://api.github.com/users/mammonbank/orgs","repos_url":"https://api.github.com/users/mammonbank/repos","events_url":"https://api.github.com/users/mammonbank/events{/privacy}","received_events_url":"https://api.github.com/users/mammonbank/received_events","type":"Organization","site_admin":false},"repo":{"id":43126588,"name":"webapp","full_name":"mammonbank/webapp","owner":{"login":"mammonbank","id":14621580,"avatar_url":"https://avatars.githubusercontent.com/u/14621580?v=3","gravatar_id":"","url":"https://api.github.com/users/mammonbank","html_url":"https://github.com/mammonbank","followers_url":"https://api.github.com/users/mammonbank/followers","following_url":"https://api.github.com/users/mammonbank/following{/other_user}","gists_url":"https://api.github.com/users/mammonbank/gists{/gist_id}","starred_url":"https://api.github.com/users/mammonbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mammonbank/subscriptions","organizations_url":"https://api.github.com/users/mammonbank/orgs","repos_url":"https://api.github.com/users/mammonbank/repos","events_url":"https://api.github.com/users/mammonbank/events{/privacy}","received_events_url":"https://api.github.com/users/mammonbank/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mammonbank/webapp","description":"Modern web-based application which simulates real banking operations","fork":false,"url":"https://api.github.com/repos/mammonbank/webapp","forks_url":"https://api.github.com/repos/mammonbank/webapp/forks","keys_url":"https://api.github.com/repos/mammonbank/webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mammonbank/webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mammonbank/webapp/teams","hooks_url":"https://api.github.com/repos/mammonbank/webapp/hooks","issue_events_url":"https://api.github.com/repos/mammonbank/webapp/issues/events{/number}","events_url":"https://api.github.com/repos/mammonbank/webapp/events","assignees_url":"https://api.github.com/repos/mammonbank/webapp/assignees{/user}","branches_url":"https://api.github.com/repos/mammonbank/webapp/branches{/branch}","tags_url":"https://api.github.com/repos/mammonbank/webapp/tags","blobs_url":"https://api.github.com/repos/mammonbank/webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mammonbank/webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mammonbank/webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mammonbank/webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mammonbank/webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/mammonbank/webapp/languages","stargazers_url":"https://api.github.com/repos/mammonbank/webapp/stargazers","contributors_url":"https://api.github.com/repos/mammonbank/webapp/contributors","subscribers_url":"https://api.github.com/repos/mammonbank/webapp/subscribers","subscription_url":"https://api.github.com/repos/mammonbank/webapp/subscription","commits_url":"https://api.github.com/repos/mammonbank/webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mammonbank/webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mammonbank/webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mammonbank/webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mammonbank/webapp/contents/{+path}","compare_url":"https://api.github.com/repos/mammonbank/webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mammonbank/webapp/merges","archive_url":"https://api.github.com/repos/mammonbank/webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mammonbank/webapp/downloads","issues_url":"https://api.github.com/repos/mammonbank/webapp/issues{/number}","pulls_url":"https://api.github.com/repos/mammonbank/webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/mammonbank/webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/mammonbank/webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mammonbank/webapp/labels{/name}","releases_url":"https://api.github.com/repos/mammonbank/webapp/releases{/id}","created_at":"2015-09-25T09:19:19Z","updated_at":"2015-11-07T14:31:27Z","pushed_at":"2015-11-07T14:04:07Z","git_url":"git://github.com/mammonbank/webapp.git","ssh_url":"git@github.com:mammonbank/webapp.git","clone_url":"https://github.com/mammonbank/webapp.git","svn_url":"https://github.com/mammonbank/webapp","homepage":null,"size":372,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mammonbank/webapp/pulls/14"},"html":{"href":"https://github.com/mammonbank/webapp/pull/14"},"issue":{"href":"https://api.github.com/repos/mammonbank/webapp/issues/14"},"comments":{"href":"https://api.github.com/repos/mammonbank/webapp/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/mammonbank/webapp/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/mammonbank/webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mammonbank/webapp/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/mammonbank/webapp/statuses/c0bd686709d9eb9519d1ff24ccc6e0ea590c72c3"}}}}