{"action":"created","comment":{"url":"https://api.github.com/repos/inaka/conferl/pulls/comments/31084649","id":31084649,"diff_hunk":"@@ -0,0 +1,55 @@\n+% This file is licensed to you under the Apache License,\n+% Version 2.0 (the \"License\"); you may not use this file\n+% except in compliance with the License.  You may obtain\n+% a copy of the License at\n+%\n+% http://www.apache.org/licenses/LICENSE-2.0\n+%\n+% Unless required by applicable law or agreed to in writing,\n+% software distributed under the License is distributed on an\n+% \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+% KIND, either express or implied.  See the License for the\n+% specific language governing permissions and limitations\n+% under the License.\n+-module(cnf_users_post_handler).\n+\n+-author('David Cao <david.cao@inakanetworks.com>').\n+\n+-include_lib(\"mixer/include/mixer.hrl\").\n+-mixin([\n+        {cnf_default_handler,\n+         [ init/3\n+         , rest_init/2\n+         , rest_terminate/2\n+         , content_types_accepted/2\n+         , content_types_provided/2\n+         ]}\n+       ]).\n+\n+-export([handle_post/2]).\n+-export([allowed_methods/2]).\n+\n+-type state() :: #{}.\n+\n+allowed_methods(Req, State) ->\n+  {[ <<\"POST\">>\n+   , <<\"OPTIONS\">>]\n+  , Req\n+  , State}.\n+\n+-spec handle_post(cowboy_req:req(), state()) ->\n+  {true, cowboy_req:req(), state()}.\n+handle_post(Req, State) ->\n+  {_, {<<\"basic\">>, {UserName, Password}}, _} =","path":"src/handlers/cnf_users_post_handler.erl","position":43,"original_position":43,"commit_id":"4f169a6d055ec2d3d360d51026b9b4a8c18c2e45","original_commit_id":"4f169a6d055ec2d3d360d51026b9b4a8c18c2e45","user":{"login":"elbrujohalcon","id":93657,"avatar_url":"https://avatars.githubusercontent.com/u/93657?v=3","gravatar_id":"","url":"https://api.github.com/users/elbrujohalcon","html_url":"https://github.com/elbrujohalcon","followers_url":"https://api.github.com/users/elbrujohalcon/followers","following_url":"https://api.github.com/users/elbrujohalcon/following{/other_user}","gists_url":"https://api.github.com/users/elbrujohalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/elbrujohalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elbrujohalcon/subscriptions","organizations_url":"https://api.github.com/users/elbrujohalcon/orgs","repos_url":"https://api.github.com/users/elbrujohalcon/repos","events_url":"https://api.github.com/users/elbrujohalcon/events{/privacy}","received_events_url":"https://api.github.com/users/elbrujohalcon/received_events","type":"User","site_admin":false},"body":"This endpoint should require no authentication. Anybody should be able to create a user.","created_at":"2015-05-26T22:03:44Z","updated_at":"2015-05-26T22:03:44Z","html_url":"https://github.com/inaka/conferl/pull/31#discussion_r31084649","pull_request_url":"https://api.github.com/repos/inaka/conferl/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/inaka/conferl/pulls/comments/31084649"},"html":{"href":"https://github.com/inaka/conferl/pull/31#discussion_r31084649"},"pull_request":{"href":"https://api.github.com/repos/inaka/conferl/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/inaka/conferl/pulls/31","id":36205341,"html_url":"https://github.com/inaka/conferl/pull/31","diff_url":"https://github.com/inaka/conferl/pull/31.diff","patch_url":"https://github.com/inaka/conferl/pull/31.patch","issue_url":"https://api.github.com/repos/inaka/conferl/issues/31","number":31,"state":"open","locked":false,"title":"Dave.24.users handler","user":{"login":"davecaos","id":6124495,"avatar_url":"https://avatars.githubusercontent.com/u/6124495?v=3","gravatar_id":"","url":"https://api.github.com/users/davecaos","html_url":"https://github.com/davecaos","followers_url":"https://api.github.com/users/davecaos/followers","following_url":"https://api.github.com/users/davecaos/following{/other_user}","gists_url":"https://api.github.com/users/davecaos/gists{/gist_id}","starred_url":"https://api.github.com/users/davecaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecaos/subscriptions","organizations_url":"https://api.github.com/users/davecaos/orgs","repos_url":"https://api.github.com/users/davecaos/repos","events_url":"https://api.github.com/users/davecaos/events{/privacy}","received_events_url":"https://api.github.com/users/davecaos/received_events","type":"User","site_admin":false},"body":"Fix #21 ","created_at":"2015-05-26T14:03:25Z","updated_at":"2015-05-26T22:03:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b2622cf25e3bd0538962d408f1c2fc608190562","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/inaka/conferl/pulls/31/commits","review_comments_url":"https://api.github.com/repos/inaka/conferl/pulls/31/comments","review_comment_url":"https://api.github.com/repos/inaka/conferl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inaka/conferl/issues/31/comments","statuses_url":"https://api.github.com/repos/inaka/conferl/statuses/4f169a6d055ec2d3d360d51026b9b4a8c18c2e45","head":{"label":"inaka:dave.24.Users_handler","ref":"dave.24.Users_handler","sha":"4f169a6d055ec2d3d360d51026b9b4a8c18c2e45","user":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"repo":{"id":33495735,"name":"conferl","full_name":"inaka/conferl","owner":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inaka/conferl","description":"Auto-Comments Service in Erlang (similar to Disqus)","fork":false,"url":"https://api.github.com/repos/inaka/conferl","forks_url":"https://api.github.com/repos/inaka/conferl/forks","keys_url":"https://api.github.com/repos/inaka/conferl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inaka/conferl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inaka/conferl/teams","hooks_url":"https://api.github.com/repos/inaka/conferl/hooks","issue_events_url":"https://api.github.com/repos/inaka/conferl/issues/events{/number}","events_url":"https://api.github.com/repos/inaka/conferl/events","assignees_url":"https://api.github.com/repos/inaka/conferl/assignees{/user}","branches_url":"https://api.github.com/repos/inaka/conferl/branches{/branch}","tags_url":"https://api.github.com/repos/inaka/conferl/tags","blobs_url":"https://api.github.com/repos/inaka/conferl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inaka/conferl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inaka/conferl/git/refs{/sha}","trees_url":"https://api.github.com/repos/inaka/conferl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inaka/conferl/statuses/{sha}","languages_url":"https://api.github.com/repos/inaka/conferl/languages","stargazers_url":"https://api.github.com/repos/inaka/conferl/stargazers","contributors_url":"https://api.github.com/repos/inaka/conferl/contributors","subscribers_url":"https://api.github.com/repos/inaka/conferl/subscribers","subscription_url":"https://api.github.com/repos/inaka/conferl/subscription","commits_url":"https://api.github.com/repos/inaka/conferl/commits{/sha}","git_commits_url":"https://api.github.com/repos/inaka/conferl/git/commits{/sha}","comments_url":"https://api.github.com/repos/inaka/conferl/comments{/number}","issue_comment_url":"https://api.github.com/repos/inaka/conferl/issues/comments{/number}","contents_url":"https://api.github.com/repos/inaka/conferl/contents/{+path}","compare_url":"https://api.github.com/repos/inaka/conferl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inaka/conferl/merges","archive_url":"https://api.github.com/repos/inaka/conferl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inaka/conferl/downloads","issues_url":"https://api.github.com/repos/inaka/conferl/issues{/number}","pulls_url":"https://api.github.com/repos/inaka/conferl/pulls{/number}","milestones_url":"https://api.github.com/repos/inaka/conferl/milestones{/number}","notifications_url":"https://api.github.com/repos/inaka/conferl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inaka/conferl/labels{/name}","releases_url":"https://api.github.com/repos/inaka/conferl/releases{/id}","created_at":"2015-04-06T17:42:24Z","updated_at":"2015-04-30T19:26:11Z","pushed_at":"2015-05-26T21:28:27Z","git_url":"git://github.com/inaka/conferl.git","ssh_url":"git@github.com:inaka/conferl.git","clone_url":"https://github.com/inaka/conferl.git","svn_url":"https://github.com/inaka/conferl","homepage":"","size":644,"stargazers_count":3,"watchers_count":3,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":3,"default_branch":"master"}},"base":{"label":"inaka:master","ref":"master","sha":"0e0e72447127fed03431b9b42bd82e8d3965d6d6","user":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"repo":{"id":33495735,"name":"conferl","full_name":"inaka/conferl","owner":{"login":"inaka","id":867053,"avatar_url":"https://avatars.githubusercontent.com/u/867053?v=3","gravatar_id":"","url":"https://api.github.com/users/inaka","html_url":"https://github.com/inaka","followers_url":"https://api.github.com/users/inaka/followers","following_url":"https://api.github.com/users/inaka/following{/other_user}","gists_url":"https://api.github.com/users/inaka/gists{/gist_id}","starred_url":"https://api.github.com/users/inaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inaka/subscriptions","organizations_url":"https://api.github.com/users/inaka/orgs","repos_url":"https://api.github.com/users/inaka/repos","events_url":"https://api.github.com/users/inaka/events{/privacy}","received_events_url":"https://api.github.com/users/inaka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inaka/conferl","description":"Auto-Comments Service in Erlang (similar to Disqus)","fork":false,"url":"https://api.github.com/repos/inaka/conferl","forks_url":"https://api.github.com/repos/inaka/conferl/forks","keys_url":"https://api.github.com/repos/inaka/conferl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inaka/conferl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inaka/conferl/teams","hooks_url":"https://api.github.com/repos/inaka/conferl/hooks","issue_events_url":"https://api.github.com/repos/inaka/conferl/issues/events{/number}","events_url":"https://api.github.com/repos/inaka/conferl/events","assignees_url":"https://api.github.com/repos/inaka/conferl/assignees{/user}","branches_url":"https://api.github.com/repos/inaka/conferl/branches{/branch}","tags_url":"https://api.github.com/repos/inaka/conferl/tags","blobs_url":"https://api.github.com/repos/inaka/conferl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inaka/conferl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inaka/conferl/git/refs{/sha}","trees_url":"https://api.github.com/repos/inaka/conferl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inaka/conferl/statuses/{sha}","languages_url":"https://api.github.com/repos/inaka/conferl/languages","stargazers_url":"https://api.github.com/repos/inaka/conferl/stargazers","contributors_url":"https://api.github.com/repos/inaka/conferl/contributors","subscribers_url":"https://api.github.com/repos/inaka/conferl/subscribers","subscription_url":"https://api.github.com/repos/inaka/conferl/subscription","commits_url":"https://api.github.com/repos/inaka/conferl/commits{/sha}","git_commits_url":"https://api.github.com/repos/inaka/conferl/git/commits{/sha}","comments_url":"https://api.github.com/repos/inaka/conferl/comments{/number}","issue_comment_url":"https://api.github.com/repos/inaka/conferl/issues/comments{/number}","contents_url":"https://api.github.com/repos/inaka/conferl/contents/{+path}","compare_url":"https://api.github.com/repos/inaka/conferl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inaka/conferl/merges","archive_url":"https://api.github.com/repos/inaka/conferl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inaka/conferl/downloads","issues_url":"https://api.github.com/repos/inaka/conferl/issues{/number}","pulls_url":"https://api.github.com/repos/inaka/conferl/pulls{/number}","milestones_url":"https://api.github.com/repos/inaka/conferl/milestones{/number}","notifications_url":"https://api.github.com/repos/inaka/conferl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inaka/conferl/labels{/name}","releases_url":"https://api.github.com/repos/inaka/conferl/releases{/id}","created_at":"2015-04-06T17:42:24Z","updated_at":"2015-04-30T19:26:11Z","pushed_at":"2015-05-26T21:28:27Z","git_url":"git://github.com/inaka/conferl.git","ssh_url":"git@github.com:inaka/conferl.git","clone_url":"https://github.com/inaka/conferl.git","svn_url":"https://github.com/inaka/conferl","homepage":"","size":644,"stargazers_count":3,"watchers_count":3,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inaka/conferl/pulls/31"},"html":{"href":"https://github.com/inaka/conferl/pull/31"},"issue":{"href":"https://api.github.com/repos/inaka/conferl/issues/31"},"comments":{"href":"https://api.github.com/repos/inaka/conferl/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/inaka/conferl/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/inaka/conferl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inaka/conferl/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/inaka/conferl/statuses/4f169a6d055ec2d3d360d51026b9b4a8c18c2e45"}}}}