{"action":"created","comment":{"url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/comments/66441183","id":66441183,"diff_hunk":"@@ -9,35 +9,50 @@\n   end\n \n   describe 'Creating new account' do\n+    before do\n+      @registration = {\n+        'username' => 'test.name',\n+        'password' => 'mypass',\n+        'email' => 'test@email.com' }\n+      @req_body = client_signed(@registration)\n+    end\n+\n     it 'HAPPY: should create a new unique account' do\n       req_header = { 'CONTENT_TYPE' => 'application/json' }\n-      req_body = { username: 'test.name',\n-                   password: 'mypass',\n-                   email: 'test@email.com' }.to_json\n-      post '/api/v1/accounts/', req_body, req_header\n+      post '/api/v1/accounts/', @req_body, req_header\n       _(last_response.status).must_equal 201\n       _(last_response.location).must_match(%r{http://})\n     end\n \n     it 'SAD: should not create accounts with duplicate usernames' do\n       req_header = { 'CONTENT_TYPE' => 'application/json' }\n-      req_body = { username: 'test.name',\n-                   password: 'mypass',\n-                   email: 'test@email.com' }.to_json\n+      registration_duplicate = {\n+        'username' => 'test.name',\n+        'password' => 'mypassword',\n+        'email' => 'testduplicate@email.com' }\n+      req_body = client_signed(registration_duplicate)\n       post '/api/v1/accounts/', req_body, req_header\n       post '/api/v1/accounts/', req_body, req_header\n       _(last_response.status).must_equal 400\n       _(last_response.location).must_be_nil\n     end\n+\n+    it 'BAD: should not create account unless requested from authorized app' do\n+      req_header = { 'CONTENT_TYPE' => 'application/json' }\n+      req_body_not_signed = @registration.to_json\n+      post '/api/v1/accounts/', req_body_not_signed, req_header\n+      _(last_response.status).must_equal 401\n+      _(last_response.location).must_be_nil\n+    end\n   end\n \n   describe 'Testing unit level properties of accounts' do\n     before do\n       @original_password = 'supermansucks'\n-      @account = CreateAccount.call(\n-        username: 'bat.man',\n-        email: 'batman@batcave.gotham.dc',\n-        password: @original_password)\n+      @account = create_client_account({\n+        'username' => 'bat.man',","path":"specs/account_spec.rb","position":56,"original_position":56,"commit_id":"f130115aeb46a125333d11fd557800d7148573c7","original_commit_id":"f130115aeb46a125333d11fd557800d7148573c7","user":{"login":"JherezTaylor","id":8041270,"avatar_url":"https://avatars.githubusercontent.com/u/8041270?v=3","gravatar_id":"","url":"https://api.github.com/users/JherezTaylor","html_url":"https://github.com/JherezTaylor","followers_url":"https://api.github.com/users/JherezTaylor/followers","following_url":"https://api.github.com/users/JherezTaylor/following{/other_user}","gists_url":"https://api.github.com/users/JherezTaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/JherezTaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JherezTaylor/subscriptions","organizations_url":"https://api.github.com/users/JherezTaylor/orgs","repos_url":"https://api.github.com/users/JherezTaylor/repos","events_url":"https://api.github.com/users/JherezTaylor/events{/privacy}","received_events_url":"https://api.github.com/users/JherezTaylor/received_events","type":"User","site_admin":false},"body":"any reason you switched from symbols?","created_at":"2016-06-09T13:36:50Z","updated_at":"2016-06-09T13:36:50Z","html_url":"https://github.com/servsecCrucible/pixeltrack/pull/31#discussion_r66441183","pull_request_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/comments/66441183"},"html":{"href":"https://github.com/servsecCrucible/pixeltrack/pull/31#discussion_r66441183"},"pull_request":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31","id":73179982,"html_url":"https://github.com/servsecCrucible/pixeltrack/pull/31","diff_url":"https://github.com/servsecCrucible/pixeltrack/pull/31.diff","patch_url":"https://github.com/servsecCrucible/pixeltrack/pull/31.patch","issue_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/31","number":31,"state":"open","locked":false,"title":"Verify client application","user":{"login":"rjollet-","id":3016215,"avatar_url":"https://avatars.githubusercontent.com/u/3016215?v=3","gravatar_id":"","url":"https://api.github.com/users/rjollet-","html_url":"https://github.com/rjollet-","followers_url":"https://api.github.com/users/rjollet-/followers","following_url":"https://api.github.com/users/rjollet-/following{/other_user}","gists_url":"https://api.github.com/users/rjollet-/gists{/gist_id}","starred_url":"https://api.github.com/users/rjollet-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjollet-/subscriptions","organizations_url":"https://api.github.com/users/rjollet-/orgs","repos_url":"https://api.github.com/users/rjollet-/repos","events_url":"https://api.github.com/users/rjollet-/events{/privacy}","received_events_url":"https://api.github.com/users/rjollet-/received_events","type":"User","site_admin":false},"body":"Update service controller, spec and confic\r\nthe SecureClientMessage verify the signature of the app","created_at":"2016-06-09T09:12:03Z","updated_at":"2016-06-09T13:36:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b417f3885dcd27fafc0e98e3f016d353b5849b0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31/commits","review_comments_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31/comments","review_comment_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/31/comments","statuses_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/statuses/f130115aeb46a125333d11fd557800d7148573c7","head":{"label":"servsecCrucible:verify_client_app","ref":"verify_client_app","sha":"f130115aeb46a125333d11fd557800d7148573c7","user":{"login":"servsecCrucible","id":17761197,"avatar_url":"https://avatars.githubusercontent.com/u/17761197?v=3","gravatar_id":"","url":"https://api.github.com/users/servsecCrucible","html_url":"https://github.com/servsecCrucible","followers_url":"https://api.github.com/users/servsecCrucible/followers","following_url":"https://api.github.com/users/servsecCrucible/following{/other_user}","gists_url":"https://api.github.com/users/servsecCrucible/gists{/gist_id}","starred_url":"https://api.github.com/users/servsecCrucible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servsecCrucible/subscriptions","organizations_url":"https://api.github.com/users/servsecCrucible/orgs","repos_url":"https://api.github.com/users/servsecCrucible/repos","events_url":"https://api.github.com/users/servsecCrucible/events{/privacy}","received_events_url":"https://api.github.com/users/servsecCrucible/received_events","type":"Organization","site_admin":false},"repo":{"id":55581720,"name":"pixeltrack","full_name":"servsecCrucible/pixeltrack","owner":{"login":"servsecCrucible","id":17761197,"avatar_url":"https://avatars.githubusercontent.com/u/17761197?v=3","gravatar_id":"","url":"https://api.github.com/users/servsecCrucible","html_url":"https://github.com/servsecCrucible","followers_url":"https://api.github.com/users/servsecCrucible/followers","following_url":"https://api.github.com/users/servsecCrucible/following{/other_user}","gists_url":"https://api.github.com/users/servsecCrucible/gists{/gist_id}","starred_url":"https://api.github.com/users/servsecCrucible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servsecCrucible/subscriptions","organizations_url":"https://api.github.com/users/servsecCrucible/orgs","repos_url":"https://api.github.com/users/servsecCrucible/repos","events_url":"https://api.github.com/users/servsecCrucible/events{/privacy}","received_events_url":"https://api.github.com/users/servsecCrucible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servsecCrucible/pixeltrack","description":"API pixel tracker","fork":false,"url":"https://api.github.com/repos/servsecCrucible/pixeltrack","forks_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/forks","keys_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/teams","hooks_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/hooks","issue_events_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/events{/number}","events_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/events","assignees_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/assignees{/user}","branches_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/branches{/branch}","tags_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/tags","blobs_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/refs{/sha}","trees_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/statuses/{sha}","languages_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/languages","stargazers_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/stargazers","contributors_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/contributors","subscribers_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/subscribers","subscription_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/subscription","commits_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/commits{/sha}","git_commits_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/commits{/sha}","comments_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/comments{/number}","issue_comment_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/comments{/number}","contents_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/contents/{+path}","compare_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/merges","archive_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/downloads","issues_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues{/number}","pulls_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls{/number}","milestones_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/milestones{/number}","notifications_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/labels{/name}","releases_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/releases{/id}","deployments_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/deployments","created_at":"2016-04-06T06:36:39Z","updated_at":"2016-04-07T14:18:52Z","pushed_at":"2016-06-09T09:12:03Z","git_url":"git://github.com/servsecCrucible/pixeltrack.git","ssh_url":"git@github.com:servsecCrucible/pixeltrack.git","clone_url":"https://github.com/servsecCrucible/pixeltrack.git","svn_url":"https://github.com/servsecCrucible/pixeltrack","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"servsecCrucible:master","ref":"master","sha":"6b036d5146a2ac66a5485a7218de7419bb87b482","user":{"login":"servsecCrucible","id":17761197,"avatar_url":"https://avatars.githubusercontent.com/u/17761197?v=3","gravatar_id":"","url":"https://api.github.com/users/servsecCrucible","html_url":"https://github.com/servsecCrucible","followers_url":"https://api.github.com/users/servsecCrucible/followers","following_url":"https://api.github.com/users/servsecCrucible/following{/other_user}","gists_url":"https://api.github.com/users/servsecCrucible/gists{/gist_id}","starred_url":"https://api.github.com/users/servsecCrucible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servsecCrucible/subscriptions","organizations_url":"https://api.github.com/users/servsecCrucible/orgs","repos_url":"https://api.github.com/users/servsecCrucible/repos","events_url":"https://api.github.com/users/servsecCrucible/events{/privacy}","received_events_url":"https://api.github.com/users/servsecCrucible/received_events","type":"Organization","site_admin":false},"repo":{"id":55581720,"name":"pixeltrack","full_name":"servsecCrucible/pixeltrack","owner":{"login":"servsecCrucible","id":17761197,"avatar_url":"https://avatars.githubusercontent.com/u/17761197?v=3","gravatar_id":"","url":"https://api.github.com/users/servsecCrucible","html_url":"https://github.com/servsecCrucible","followers_url":"https://api.github.com/users/servsecCrucible/followers","following_url":"https://api.github.com/users/servsecCrucible/following{/other_user}","gists_url":"https://api.github.com/users/servsecCrucible/gists{/gist_id}","starred_url":"https://api.github.com/users/servsecCrucible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/servsecCrucible/subscriptions","organizations_url":"https://api.github.com/users/servsecCrucible/orgs","repos_url":"https://api.github.com/users/servsecCrucible/repos","events_url":"https://api.github.com/users/servsecCrucible/events{/privacy}","received_events_url":"https://api.github.com/users/servsecCrucible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/servsecCrucible/pixeltrack","description":"API pixel tracker","fork":false,"url":"https://api.github.com/repos/servsecCrucible/pixeltrack","forks_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/forks","keys_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/teams","hooks_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/hooks","issue_events_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/events{/number}","events_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/events","assignees_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/assignees{/user}","branches_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/branches{/branch}","tags_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/tags","blobs_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/refs{/sha}","trees_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/statuses/{sha}","languages_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/languages","stargazers_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/stargazers","contributors_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/contributors","subscribers_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/subscribers","subscription_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/subscription","commits_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/commits{/sha}","git_commits_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/git/commits{/sha}","comments_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/comments{/number}","issue_comment_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/comments{/number}","contents_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/contents/{+path}","compare_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/merges","archive_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/downloads","issues_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues{/number}","pulls_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls{/number}","milestones_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/milestones{/number}","notifications_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/labels{/name}","releases_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/releases{/id}","deployments_url":"https://api.github.com/repos/servsecCrucible/pixeltrack/deployments","created_at":"2016-04-06T06:36:39Z","updated_at":"2016-04-07T14:18:52Z","pushed_at":"2016-06-09T09:12:03Z","git_url":"git://github.com/servsecCrucible/pixeltrack.git","ssh_url":"git@github.com:servsecCrucible/pixeltrack.git","clone_url":"https://github.com/servsecCrucible/pixeltrack.git","svn_url":"https://github.com/servsecCrucible/pixeltrack","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31"},"html":{"href":"https://github.com/servsecCrucible/pixeltrack/pull/31"},"issue":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/31"},"comments":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/servsecCrucible/pixeltrack/statuses/f130115aeb46a125333d11fd557800d7148573c7"}}}}
{"actor":{"display_login":"JherezTaylor"}}