{"action":"opened","number":154,"pull_request":{"url":"https://api.github.com/repos/rackerlabs/mimic/pulls/154","id":27734712,"html_url":"https://github.com/rackerlabs/mimic/pull/154","diff_url":"https://github.com/rackerlabs/mimic/pull/154.diff","patch_url":"https://github.com/rackerlabs/mimic/pull/154.patch","issue_url":"https://api.github.com/repos/rackerlabs/mimic/issues/154","number":154,"state":"open","locked":false,"title":"RFR - Return 401 if authing with the wrong tenant ID","user":{"login":"cyli","id":223200,"avatar_url":"https://avatars.githubusercontent.com/u/223200?v=3","gravatar_id":"","url":"https://api.github.com/users/cyli","html_url":"https://github.com/cyli","followers_url":"https://api.github.com/users/cyli/followers","following_url":"https://api.github.com/users/cyli/following{/other_user}","gists_url":"https://api.github.com/users/cyli/gists{/gist_id}","starred_url":"https://api.github.com/users/cyli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyli/subscriptions","organizations_url":"https://api.github.com/users/cyli/orgs","repos_url":"https://api.github.com/users/cyli/repos","events_url":"https://api.github.com/users/cyli/events{/privacy}","received_events_url":"https://api.github.com/users/cyli/received_events","type":"User","site_admin":false},"body":"This should fix issue #146.\r\n\r\nBasically if you auth once, and auth again but specify a different tenant ID, identity should return 401.\r\nI unfortunately also had to sneak a change to actually validate the token, because I couldn't trigger the failure otherwise.  Luckily this doesn't break any tests.\r\n\r\nNot super happy about the `get_token_and_service_catalog` refactor, but the error message for username/password and username/api-key differs very slightly from the token/tenant_id auth.  Suggestions welcome.","created_at":"2015-01-21T04:29:20Z","updated_at":"2015-01-21T04:29:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/mimic/pulls/154/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/mimic/pulls/154/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/mimic/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rackerlabs/mimic/issues/154/comments","statuses_url":"https://api.github.com/repos/rackerlabs/mimic/statuses/706a450ef36a71438ea359d731165b6d9a2387a7","head":{"label":"rackerlabs:fix-146","ref":"fix-146","sha":"706a450ef36a71438ea359d731165b6d9a2387a7","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":13158707,"name":"mimic","full_name":"rackerlabs/mimic","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/mimic","description":"An API mock service","fork":false,"url":"https://api.github.com/repos/rackerlabs/mimic","forks_url":"https://api.github.com/repos/rackerlabs/mimic/forks","keys_url":"https://api.github.com/repos/rackerlabs/mimic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/mimic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/mimic/teams","hooks_url":"https://api.github.com/repos/rackerlabs/mimic/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/mimic/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/mimic/events","assignees_url":"https://api.github.com/repos/rackerlabs/mimic/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/mimic/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/mimic/tags","blobs_url":"https://api.github.com/repos/rackerlabs/mimic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/mimic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/mimic/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/mimic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/mimic/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/mimic/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/mimic/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/mimic/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/mimic/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/mimic/subscription","commits_url":"https://api.github.com/repos/rackerlabs/mimic/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/mimic/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/mimic/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/mimic/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/mimic/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/mimic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/mimic/merges","archive_url":"https://api.github.com/repos/rackerlabs/mimic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/mimic/downloads","issues_url":"https://api.github.com/repos/rackerlabs/mimic/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/mimic/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/mimic/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/mimic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/mimic/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/mimic/releases{/id}","created_at":"2013-09-27T19:01:16Z","updated_at":"2015-01-15T19:59:31Z","pushed_at":"2015-01-21T04:26:05Z","git_url":"git://github.com/rackerlabs/mimic.git","ssh_url":"git@github.com:rackerlabs/mimic.git","clone_url":"https://github.com/rackerlabs/mimic.git","svn_url":"https://github.com/rackerlabs/mimic","homepage":"","size":2528,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":37,"forks":19,"open_issues":37,"watchers":48,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"bbc2a986ec6804c77bffcbb3f76db7ea90c0d831","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":13158707,"name":"mimic","full_name":"rackerlabs/mimic","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/mimic","description":"An API mock service","fork":false,"url":"https://api.github.com/repos/rackerlabs/mimic","forks_url":"https://api.github.com/repos/rackerlabs/mimic/forks","keys_url":"https://api.github.com/repos/rackerlabs/mimic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/mimic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/mimic/teams","hooks_url":"https://api.github.com/repos/rackerlabs/mimic/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/mimic/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/mimic/events","assignees_url":"https://api.github.com/repos/rackerlabs/mimic/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/mimic/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/mimic/tags","blobs_url":"https://api.github.com/repos/rackerlabs/mimic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/mimic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/mimic/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/mimic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/mimic/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/mimic/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/mimic/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/mimic/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/mimic/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/mimic/subscription","commits_url":"https://api.github.com/repos/rackerlabs/mimic/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/mimic/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/mimic/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/mimic/issues/comments/{number}","contents_url":"https://api.github.com/repos/rackerlabs/mimic/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/mimic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/mimic/merges","archive_url":"https://api.github.com/repos/rackerlabs/mimic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/mimic/downloads","issues_url":"https://api.github.com/repos/rackerlabs/mimic/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/mimic/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/mimic/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/mimic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/mimic/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/mimic/releases{/id}","created_at":"2013-09-27T19:01:16Z","updated_at":"2015-01-15T19:59:31Z","pushed_at":"2015-01-21T04:26:05Z","git_url":"git://github.com/rackerlabs/mimic.git","ssh_url":"git@github.com:rackerlabs/mimic.git","clone_url":"https://github.com/rackerlabs/mimic.git","svn_url":"https://github.com/rackerlabs/mimic","homepage":"","size":2528,"stargazers_count":48,"watchers_count":48,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":37,"forks":19,"open_issues":37,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/mimic/pulls/154"},"html":{"href":"https://github.com/rackerlabs/mimic/pull/154"},"issue":{"href":"https://api.github.com/repos/rackerlabs/mimic/issues/154"},"comments":{"href":"https://api.github.com/repos/rackerlabs/mimic/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/mimic/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/mimic/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/mimic/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/mimic/statuses/706a450ef36a71438ea359d731165b6d9a2387a7"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":260,"deletions":34,"changed_files":4}}