{"action":"created","comment":{"url":"https://api.github.com/repos/Pylons/pyramid/pulls/comments/91189044","pull_request_review_id":11699052,"id":91189044,"diff_hunk":"@@ -1,5 +1,16 @@\n-USERS = {'editor':'editor',\n-          'viewer':'viewer'}\n+import bcrypt\n+\n+\n+def hash_password(pw):\n+    return bcrypt.hashpw(pw.encode('utf-8'), bcrypt.gensalt())","path":"docs/tutorials/wiki/src/authorization/tutorial/security.py","position":7,"original_position":7,"commit_id":"b01a0233aa03b4b5a9ddd640a7a114f68d1c763d","original_commit_id":"b01a0233aa03b4b5a9ddd640a7a114f68d1c763d","user":{"login":"stevepiercy","id":102112,"avatar_url":"https://avatars.githubusercontent.com/u/102112?v=3","gravatar_id":"","url":"https://api.github.com/users/stevepiercy","html_url":"https://github.com/stevepiercy","followers_url":"https://api.github.com/users/stevepiercy/followers","following_url":"https://api.github.com/users/stevepiercy/following{/other_user}","gists_url":"https://api.github.com/users/stevepiercy/gists{/gist_id}","starred_url":"https://api.github.com/users/stevepiercy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevepiercy/subscriptions","organizations_url":"https://api.github.com/users/stevepiercy/orgs","repos_url":"https://api.github.com/users/stevepiercy/repos","events_url":"https://api.github.com/users/stevepiercy/events{/privacy}","received_events_url":"https://api.github.com/users/stevepiercy/received_events","type":"User","site_admin":false},"body":"I would like wiki and wiki2 to have consistent implementations, whichever is preferred.","created_at":"2016-12-06T22:39:53Z","updated_at":"2016-12-06T22:39:53Z","html_url":"https://github.com/Pylons/pyramid/pull/2849#discussion_r91189044","pull_request_url":"https://api.github.com/repos/Pylons/pyramid/pulls/2849","_links":{"self":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/comments/91189044"},"html":{"href":"https://github.com/Pylons/pyramid/pull/2849#discussion_r91189044"},"pull_request":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2849"}}},"pull_request":{"url":"https://api.github.com/repos/Pylons/pyramid/pulls/2849","id":96752871,"html_url":"https://github.com/Pylons/pyramid/pull/2849","diff_url":"https://github.com/Pylons/pyramid/pull/2849.diff","patch_url":"https://github.com/Pylons/pyramid/pull/2849.patch","issue_url":"https://api.github.com/repos/Pylons/pyramid/issues/2849","number":2849,"state":"open","locked":false,"title":"Changed wiki tutorial to showcase passwrd hashing with bcrypt.","user":{"login":"mfrlin","id":1454607,"avatar_url":"https://avatars.githubusercontent.com/u/1454607?v=3","gravatar_id":"","url":"https://api.github.com/users/mfrlin","html_url":"https://github.com/mfrlin","followers_url":"https://api.github.com/users/mfrlin/followers","following_url":"https://api.github.com/users/mfrlin/following{/other_user}","gists_url":"https://api.github.com/users/mfrlin/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrlin/subscriptions","organizations_url":"https://api.github.com/users/mfrlin/orgs","repos_url":"https://api.github.com/users/mfrlin/repos","events_url":"https://api.github.com/users/mfrlin/events{/privacy}","received_events_url":"https://api.github.com/users/mfrlin/received_events","type":"User","site_admin":false},"body":"Relates to #2204\r\n\r\nSince this tutorial does not store user data in a database I have just showcased how hashing works and explained more strongly that in real applications you are probably gong to store users in a database.\r\n\r\nWould appreciate if someone would have read through and suggest corrections if something needs more explaining or stronger warnings about clear text dangers or something.\r\n\r\nDisregard branch name.","created_at":"2016-12-06T16:06:44Z","updated_at":"2016-12-06T22:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6d84dbff7dbf4d80e98456630da65ea373294570","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Pylons/pyramid/pulls/2849/commits","review_comments_url":"https://api.github.com/repos/Pylons/pyramid/pulls/2849/comments","review_comment_url":"https://api.github.com/repos/Pylons/pyramid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pylons/pyramid/issues/2849/comments","statuses_url":"https://api.github.com/repos/Pylons/pyramid/statuses/b01a0233aa03b4b5a9ddd640a7a114f68d1c763d","head":{"label":"mfrlin:issue-2656","ref":"issue-2656","sha":"b01a0233aa03b4b5a9ddd640a7a114f68d1c763d","user":{"login":"mfrlin","id":1454607,"avatar_url":"https://avatars.githubusercontent.com/u/1454607?v=3","gravatar_id":"","url":"https://api.github.com/users/mfrlin","html_url":"https://github.com/mfrlin","followers_url":"https://api.github.com/users/mfrlin/followers","following_url":"https://api.github.com/users/mfrlin/following{/other_user}","gists_url":"https://api.github.com/users/mfrlin/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrlin/subscriptions","organizations_url":"https://api.github.com/users/mfrlin/orgs","repos_url":"https://api.github.com/users/mfrlin/repos","events_url":"https://api.github.com/users/mfrlin/events{/privacy}","received_events_url":"https://api.github.com/users/mfrlin/received_events","type":"User","site_admin":false},"repo":{"id":75614046,"name":"pyramid","full_name":"mfrlin/pyramid","owner":{"login":"mfrlin","id":1454607,"avatar_url":"https://avatars.githubusercontent.com/u/1454607?v=3","gravatar_id":"","url":"https://api.github.com/users/mfrlin","html_url":"https://github.com/mfrlin","followers_url":"https://api.github.com/users/mfrlin/followers","following_url":"https://api.github.com/users/mfrlin/following{/other_user}","gists_url":"https://api.github.com/users/mfrlin/gists{/gist_id}","starred_url":"https://api.github.com/users/mfrlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfrlin/subscriptions","organizations_url":"https://api.github.com/users/mfrlin/orgs","repos_url":"https://api.github.com/users/mfrlin/repos","events_url":"https://api.github.com/users/mfrlin/events{/privacy}","received_events_url":"https://api.github.com/users/mfrlin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mfrlin/pyramid","description":"Pyramid web framework","fork":true,"url":"https://api.github.com/repos/mfrlin/pyramid","forks_url":"https://api.github.com/repos/mfrlin/pyramid/forks","keys_url":"https://api.github.com/repos/mfrlin/pyramid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mfrlin/pyramid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mfrlin/pyramid/teams","hooks_url":"https://api.github.com/repos/mfrlin/pyramid/hooks","issue_events_url":"https://api.github.com/repos/mfrlin/pyramid/issues/events{/number}","events_url":"https://api.github.com/repos/mfrlin/pyramid/events","assignees_url":"https://api.github.com/repos/mfrlin/pyramid/assignees{/user}","branches_url":"https://api.github.com/repos/mfrlin/pyramid/branches{/branch}","tags_url":"https://api.github.com/repos/mfrlin/pyramid/tags","blobs_url":"https://api.github.com/repos/mfrlin/pyramid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mfrlin/pyramid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mfrlin/pyramid/git/refs{/sha}","trees_url":"https://api.github.com/repos/mfrlin/pyramid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mfrlin/pyramid/statuses/{sha}","languages_url":"https://api.github.com/repos/mfrlin/pyramid/languages","stargazers_url":"https://api.github.com/repos/mfrlin/pyramid/stargazers","contributors_url":"https://api.github.com/repos/mfrlin/pyramid/contributors","subscribers_url":"https://api.github.com/repos/mfrlin/pyramid/subscribers","subscription_url":"https://api.github.com/repos/mfrlin/pyramid/subscription","commits_url":"https://api.github.com/repos/mfrlin/pyramid/commits{/sha}","git_commits_url":"https://api.github.com/repos/mfrlin/pyramid/git/commits{/sha}","comments_url":"https://api.github.com/repos/mfrlin/pyramid/comments{/number}","issue_comment_url":"https://api.github.com/repos/mfrlin/pyramid/issues/comments{/number}","contents_url":"https://api.github.com/repos/mfrlin/pyramid/contents/{+path}","compare_url":"https://api.github.com/repos/mfrlin/pyramid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mfrlin/pyramid/merges","archive_url":"https://api.github.com/repos/mfrlin/pyramid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mfrlin/pyramid/downloads","issues_url":"https://api.github.com/repos/mfrlin/pyramid/issues{/number}","pulls_url":"https://api.github.com/repos/mfrlin/pyramid/pulls{/number}","milestones_url":"https://api.github.com/repos/mfrlin/pyramid/milestones{/number}","notifications_url":"https://api.github.com/repos/mfrlin/pyramid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mfrlin/pyramid/labels{/name}","releases_url":"https://api.github.com/repos/mfrlin/pyramid/releases{/id}","deployments_url":"https://api.github.com/repos/mfrlin/pyramid/deployments","created_at":"2016-12-05T10:28:12Z","updated_at":"2016-12-05T10:28:14Z","pushed_at":"2016-12-06T15:37:40Z","git_url":"git://github.com/mfrlin/pyramid.git","ssh_url":"git@github.com:mfrlin/pyramid.git","clone_url":"https://github.com/mfrlin/pyramid.git","svn_url":"https://github.com/mfrlin/pyramid","homepage":"https://trypyramid.com/","size":20297,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Pylons:master","ref":"master","sha":"7ab666e3e2539662ff3324a4bdedbca3c8f8040a","user":{"login":"Pylons","id":452227,"avatar_url":"https://avatars.githubusercontent.com/u/452227?v=3","gravatar_id":"","url":"https://api.github.com/users/Pylons","html_url":"https://github.com/Pylons","followers_url":"https://api.github.com/users/Pylons/followers","following_url":"https://api.github.com/users/Pylons/following{/other_user}","gists_url":"https://api.github.com/users/Pylons/gists{/gist_id}","starred_url":"https://api.github.com/users/Pylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pylons/subscriptions","organizations_url":"https://api.github.com/users/Pylons/orgs","repos_url":"https://api.github.com/users/Pylons/repos","events_url":"https://api.github.com/users/Pylons/events{/privacy}","received_events_url":"https://api.github.com/users/Pylons/received_events","type":"Organization","site_admin":false},"repo":{"id":1020639,"name":"pyramid","full_name":"Pylons/pyramid","owner":{"login":"Pylons","id":452227,"avatar_url":"https://avatars.githubusercontent.com/u/452227?v=3","gravatar_id":"","url":"https://api.github.com/users/Pylons","html_url":"https://github.com/Pylons","followers_url":"https://api.github.com/users/Pylons/followers","following_url":"https://api.github.com/users/Pylons/following{/other_user}","gists_url":"https://api.github.com/users/Pylons/gists{/gist_id}","starred_url":"https://api.github.com/users/Pylons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pylons/subscriptions","organizations_url":"https://api.github.com/users/Pylons/orgs","repos_url":"https://api.github.com/users/Pylons/repos","events_url":"https://api.github.com/users/Pylons/events{/privacy}","received_events_url":"https://api.github.com/users/Pylons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Pylons/pyramid","description":"Pyramid web framework","fork":false,"url":"https://api.github.com/repos/Pylons/pyramid","forks_url":"https://api.github.com/repos/Pylons/pyramid/forks","keys_url":"https://api.github.com/repos/Pylons/pyramid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pylons/pyramid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pylons/pyramid/teams","hooks_url":"https://api.github.com/repos/Pylons/pyramid/hooks","issue_events_url":"https://api.github.com/repos/Pylons/pyramid/issues/events{/number}","events_url":"https://api.github.com/repos/Pylons/pyramid/events","assignees_url":"https://api.github.com/repos/Pylons/pyramid/assignees{/user}","branches_url":"https://api.github.com/repos/Pylons/pyramid/branches{/branch}","tags_url":"https://api.github.com/repos/Pylons/pyramid/tags","blobs_url":"https://api.github.com/repos/Pylons/pyramid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pylons/pyramid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pylons/pyramid/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pylons/pyramid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pylons/pyramid/statuses/{sha}","languages_url":"https://api.github.com/repos/Pylons/pyramid/languages","stargazers_url":"https://api.github.com/repos/Pylons/pyramid/stargazers","contributors_url":"https://api.github.com/repos/Pylons/pyramid/contributors","subscribers_url":"https://api.github.com/repos/Pylons/pyramid/subscribers","subscription_url":"https://api.github.com/repos/Pylons/pyramid/subscription","commits_url":"https://api.github.com/repos/Pylons/pyramid/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pylons/pyramid/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pylons/pyramid/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pylons/pyramid/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pylons/pyramid/contents/{+path}","compare_url":"https://api.github.com/repos/Pylons/pyramid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pylons/pyramid/merges","archive_url":"https://api.github.com/repos/Pylons/pyramid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pylons/pyramid/downloads","issues_url":"https://api.github.com/repos/Pylons/pyramid/issues{/number}","pulls_url":"https://api.github.com/repos/Pylons/pyramid/pulls{/number}","milestones_url":"https://api.github.com/repos/Pylons/pyramid/milestones{/number}","notifications_url":"https://api.github.com/repos/Pylons/pyramid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pylons/pyramid/labels{/name}","releases_url":"https://api.github.com/repos/Pylons/pyramid/releases{/id}","deployments_url":"https://api.github.com/repos/Pylons/pyramid/deployments","created_at":"2010-10-24T22:00:35Z","updated_at":"2016-12-06T20:17:48Z","pushed_at":"2016-12-06T21:38:39Z","git_url":"git://github.com/Pylons/pyramid.git","ssh_url":"git@github.com:Pylons/pyramid.git","clone_url":"https://github.com/Pylons/pyramid.git","svn_url":"https://github.com/Pylons/pyramid","homepage":"https://trypyramid.com/","size":29687,"stargazers_count":2174,"watchers_count":2174,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":709,"mirror_url":null,"open_issues_count":107,"forks":709,"open_issues":107,"watchers":2174,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2849"},"html":{"href":"https://github.com/Pylons/pyramid/pull/2849"},"issue":{"href":"https://api.github.com/repos/Pylons/pyramid/issues/2849"},"comments":{"href":"https://api.github.com/repos/Pylons/pyramid/issues/2849/comments"},"review_comments":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2849/comments"},"review_comment":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pylons/pyramid/pulls/2849/commits"},"statuses":{"href":"https://api.github.com/repos/Pylons/pyramid/statuses/b01a0233aa03b4b5a9ddd640a7a114f68d1c763d"}}}}
{"actor":{"display_login":"stevepiercy"}}