{"action":"created","comment":{"url":"https://api.github.com/repos/binaris/binaris/pulls/comments/239498247","pull_request_review_id":182298008,"id":239498247,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTQ5ODI0Nw==","diff_hunk":"@@ -259,15 +263,30 @@ const loginHandler = async function loginHandler() {\n   logger.info(\n `Please enter your Binaris API key to deploy and invoke functions.\n If you don't have a key, head over to https://binaris.com to request one`);\n-  const answer = await inquirer.prompt([{\n-    type: 'password',\n-    name: 'apiKey',\n-    message: 'API Key:',\n-  }]);\n-  if (!await auth.verifyAPIKey(answer.apiKey)) {\n-    throw new Error('Invalid API key');\n+  const { rawApiKey } = await inquirer.prompt([\n+    {\n+      type: 'password',\n+      name: 'rawApiKey',\n+      message: 'API Key:',\n+    },\n+  ]);\n+\n+  const apiKeyIdx = rawApiKey.lastIndexOf('-');\n+  const apiKey = rawApiKey.substr(apiKeyIdx + 1);\n+  const realm = rawApiKey.substr(0, apiKeyIdx);\n+\n+  if (realm) {\n+    forceRealm(realm);\n   }\n-  await updateAPIKey(answer.apiKey);\n+  const { accountId, error } = await auth.verifyAPIKey(apiKey);","path":"lib/index.js","position":55,"original_position":55,"commit_id":"3671f9873676fa7ae1e995ef32dded647bf916e1","original_commit_id":"dff90af72f1ef1a32b6ab30573ad7633626c8da6","user":{"login":"bergundy","id":52304,"node_id":"MDQ6VXNlcjUyMzA0","avatar_url":"https://avatars1.githubusercontent.com/u/52304?v=4","gravatar_id":"","url":"https://api.github.com/users/bergundy","html_url":"https://github.com/bergundy","followers_url":"https://api.github.com/users/bergundy/followers","following_url":"https://api.github.com/users/bergundy/following{/other_user}","gists_url":"https://api.github.com/users/bergundy/gists{/gist_id}","starred_url":"https://api.github.com/users/bergundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergundy/subscriptions","organizations_url":"https://api.github.com/users/bergundy/orgs","repos_url":"https://api.github.com/users/bergundy/repos","events_url":"https://api.github.com/users/bergundy/events{/privacy}","received_events_url":"https://api.github.com/users/bergundy/received_events","type":"User","site_admin":false},"body":"I wanted to preserve the behaviour of the previous login flow","created_at":"2018-12-06T15:34:46Z","updated_at":"2018-12-06T15:34:47Z","html_url":"https://github.com/binaris/binaris/pull/389#discussion_r239498247","pull_request_url":"https://api.github.com/repos/binaris/binaris/pulls/389","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/binaris/binaris/pulls/comments/239498247"},"html":{"href":"https://github.com/binaris/binaris/pull/389#discussion_r239498247"},"pull_request":{"href":"https://api.github.com/repos/binaris/binaris/pulls/389"}},"in_reply_to_id":239430853},"pull_request":{"url":"https://api.github.com/repos/binaris/binaris/pulls/389","id":235261296,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MjYxMjk2","html_url":"https://github.com/binaris/binaris/pull/389","diff_url":"https://github.com/binaris/binaris/pull/389.diff","patch_url":"https://github.com/binaris/binaris/pull/389.patch","issue_url":"https://api.github.com/repos/binaris/binaris/issues/389","number":389,"state":"open","locked":false,"title":"Use V2 URLs","user":{"login":"bergundy","id":52304,"node_id":"MDQ6VXNlcjUyMzA0","avatar_url":"https://avatars1.githubusercontent.com/u/52304?v=4","gravatar_id":"","url":"https://api.github.com/users/bergundy","html_url":"https://github.com/bergundy","followers_url":"https://api.github.com/users/bergundy/followers","following_url":"https://api.github.com/users/bergundy/following{/other_user}","gists_url":"https://api.github.com/users/bergundy/gists{/gist_id}","starred_url":"https://api.github.com/users/bergundy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bergundy/subscriptions","organizations_url":"https://api.github.com/users/bergundy/orgs","repos_url":"https://api.github.com/users/bergundy/repos","events_url":"https://api.github.com/users/bergundy/events{/privacy}","received_events_url":"https://api.github.com/users/bergundy/received_events","type":"User","site_admin":false},"body":"Implements the V2 spec (for KubeCon).\r\nShould theoretically support pre account URLs when `accountId` is not found to avoid breaking current customers' integrations.\r\nDepends on integration from other services with this branch.\r\n\r\nCC: @michaeladda \r\n","created_at":"2018-12-02T14:12:38Z","updated_at":"2018-12-06T15:34:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93b85856c23cc3e36743b06e223d093f1e87de19","assignee":null,"assignees":[],"requested_reviewers":[{"login":"vogre","id":334187,"node_id":"MDQ6VXNlcjMzNDE4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/334187?v=4","gravatar_id":"","url":"https://api.github.com/users/vogre","html_url":"https://github.com/vogre","followers_url":"https://api.github.com/users/vogre/followers","following_url":"https://api.github.com/users/vogre/following{/other_user}","gists_url":"https://api.github.com/users/vogre/gists{/gist_id}","starred_url":"https://api.github.com/users/vogre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogre/subscriptions","organizations_url":"https://api.github.com/users/vogre/orgs","repos_url":"https://api.github.com/users/vogre/repos","events_url":"https://api.github.com/users/vogre/events{/privacy}","received_events_url":"https://api.github.com/users/vogre/received_events","type":"User","site_admin":false},{"login":"rylandg","id":27736122,"node_id":"MDQ6VXNlcjI3NzM2MTIy","avatar_url":"https://avatars0.githubusercontent.com/u/27736122?v=4","gravatar_id":"","url":"https://api.github.com/users/rylandg","html_url":"https://github.com/rylandg","followers_url":"https://api.github.com/users/rylandg/followers","following_url":"https://api.github.com/users/rylandg/following{/other_user}","gists_url":"https://api.github.com/users/rylandg/gists{/gist_id}","starred_url":"https://api.github.com/users/rylandg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rylandg/subscriptions","organizations_url":"https://api.github.com/users/rylandg/orgs","repos_url":"https://api.github.com/users/rylandg/repos","events_url":"https://api.github.com/users/rylandg/events{/privacy}","received_events_url":"https://api.github.com/users/rylandg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1152514763,"node_id":"MDU6TGFiZWwxMTUyNTE0NzYz","url":"https://api.github.com/repos/binaris/binaris/labels/do%20not%20merge","name":"do not merge","color":"d93f0b","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/binaris/binaris/pulls/389/commits","review_comments_url":"https://api.github.com/repos/binaris/binaris/pulls/389/comments","review_comment_url":"https://api.github.com/repos/binaris/binaris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/binaris/binaris/issues/389/comments","statuses_url":"https://api.github.com/repos/binaris/binaris/statuses/3671f9873676fa7ae1e995ef32dded647bf916e1","head":{"label":"binaris:feature-v2-run","ref":"feature-v2-run","sha":"3671f9873676fa7ae1e995ef32dded647bf916e1","user":{"login":"binaris","id":27725492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzI1NDky","avatar_url":"https://avatars0.githubusercontent.com/u/27725492?v=4","gravatar_id":"","url":"https://api.github.com/users/binaris","html_url":"https://github.com/binaris","followers_url":"https://api.github.com/users/binaris/followers","following_url":"https://api.github.com/users/binaris/following{/other_user}","gists_url":"https://api.github.com/users/binaris/gists{/gist_id}","starred_url":"https://api.github.com/users/binaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaris/subscriptions","organizations_url":"https://api.github.com/users/binaris/orgs","repos_url":"https://api.github.com/users/binaris/repos","events_url":"https://api.github.com/users/binaris/events{/privacy}","received_events_url":"https://api.github.com/users/binaris/received_events","type":"Organization","site_admin":false},"repo":{"id":103460196,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM0NjAxOTY=","name":"binaris","full_name":"binaris/binaris","private":false,"owner":{"login":"binaris","id":27725492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzI1NDky","avatar_url":"https://avatars0.githubusercontent.com/u/27725492?v=4","gravatar_id":"","url":"https://api.github.com/users/binaris","html_url":"https://github.com/binaris","followers_url":"https://api.github.com/users/binaris/followers","following_url":"https://api.github.com/users/binaris/following{/other_user}","gists_url":"https://api.github.com/users/binaris/gists{/gist_id}","starred_url":"https://api.github.com/users/binaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaris/subscriptions","organizations_url":"https://api.github.com/users/binaris/orgs","repos_url":"https://api.github.com/users/binaris/repos","events_url":"https://api.github.com/users/binaris/events{/privacy}","received_events_url":"https://api.github.com/users/binaris/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/binaris/binaris","description":"Binaris Function as a Service CLI","fork":false,"url":"https://api.github.com/repos/binaris/binaris","forks_url":"https://api.github.com/repos/binaris/binaris/forks","keys_url":"https://api.github.com/repos/binaris/binaris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binaris/binaris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binaris/binaris/teams","hooks_url":"https://api.github.com/repos/binaris/binaris/hooks","issue_events_url":"https://api.github.com/repos/binaris/binaris/issues/events{/number}","events_url":"https://api.github.com/repos/binaris/binaris/events","assignees_url":"https://api.github.com/repos/binaris/binaris/assignees{/user}","branches_url":"https://api.github.com/repos/binaris/binaris/branches{/branch}","tags_url":"https://api.github.com/repos/binaris/binaris/tags","blobs_url":"https://api.github.com/repos/binaris/binaris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binaris/binaris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binaris/binaris/git/refs{/sha}","trees_url":"https://api.github.com/repos/binaris/binaris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binaris/binaris/statuses/{sha}","languages_url":"https://api.github.com/repos/binaris/binaris/languages","stargazers_url":"https://api.github.com/repos/binaris/binaris/stargazers","contributors_url":"https://api.github.com/repos/binaris/binaris/contributors","subscribers_url":"https://api.github.com/repos/binaris/binaris/subscribers","subscription_url":"https://api.github.com/repos/binaris/binaris/subscription","commits_url":"https://api.github.com/repos/binaris/binaris/commits{/sha}","git_commits_url":"https://api.github.com/repos/binaris/binaris/git/commits{/sha}","comments_url":"https://api.github.com/repos/binaris/binaris/comments{/number}","issue_comment_url":"https://api.github.com/repos/binaris/binaris/issues/comments{/number}","contents_url":"https://api.github.com/repos/binaris/binaris/contents/{+path}","compare_url":"https://api.github.com/repos/binaris/binaris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binaris/binaris/merges","archive_url":"https://api.github.com/repos/binaris/binaris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binaris/binaris/downloads","issues_url":"https://api.github.com/repos/binaris/binaris/issues{/number}","pulls_url":"https://api.github.com/repos/binaris/binaris/pulls{/number}","milestones_url":"https://api.github.com/repos/binaris/binaris/milestones{/number}","notifications_url":"https://api.github.com/repos/binaris/binaris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binaris/binaris/labels{/name}","releases_url":"https://api.github.com/repos/binaris/binaris/releases{/id}","deployments_url":"https://api.github.com/repos/binaris/binaris/deployments","created_at":"2017-09-13T22:57:26Z","updated_at":"2018-12-03T14:54:36Z","pushed_at":"2018-12-06T15:30:49Z","git_url":"git://github.com/binaris/binaris.git","ssh_url":"git@github.com:binaris/binaris.git","clone_url":"https://github.com/binaris/binaris.git","svn_url":"https://github.com/binaris/binaris","homepage":"https://dev.binaris.com/","size":501,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":45,"watchers":10,"default_branch":"master"}},"base":{"label":"binaris:master","ref":"master","sha":"66df54ab4b6d5b63970820fea2c610bbd9f76efc","user":{"login":"binaris","id":27725492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzI1NDky","avatar_url":"https://avatars0.githubusercontent.com/u/27725492?v=4","gravatar_id":"","url":"https://api.github.com/users/binaris","html_url":"https://github.com/binaris","followers_url":"https://api.github.com/users/binaris/followers","following_url":"https://api.github.com/users/binaris/following{/other_user}","gists_url":"https://api.github.com/users/binaris/gists{/gist_id}","starred_url":"https://api.github.com/users/binaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaris/subscriptions","organizations_url":"https://api.github.com/users/binaris/orgs","repos_url":"https://api.github.com/users/binaris/repos","events_url":"https://api.github.com/users/binaris/events{/privacy}","received_events_url":"https://api.github.com/users/binaris/received_events","type":"Organization","site_admin":false},"repo":{"id":103460196,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM0NjAxOTY=","name":"binaris","full_name":"binaris/binaris","private":false,"owner":{"login":"binaris","id":27725492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3NzI1NDky","avatar_url":"https://avatars0.githubusercontent.com/u/27725492?v=4","gravatar_id":"","url":"https://api.github.com/users/binaris","html_url":"https://github.com/binaris","followers_url":"https://api.github.com/users/binaris/followers","following_url":"https://api.github.com/users/binaris/following{/other_user}","gists_url":"https://api.github.com/users/binaris/gists{/gist_id}","starred_url":"https://api.github.com/users/binaris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaris/subscriptions","organizations_url":"https://api.github.com/users/binaris/orgs","repos_url":"https://api.github.com/users/binaris/repos","events_url":"https://api.github.com/users/binaris/events{/privacy}","received_events_url":"https://api.github.com/users/binaris/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/binaris/binaris","description":"Binaris Function as a Service CLI","fork":false,"url":"https://api.github.com/repos/binaris/binaris","forks_url":"https://api.github.com/repos/binaris/binaris/forks","keys_url":"https://api.github.com/repos/binaris/binaris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binaris/binaris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binaris/binaris/teams","hooks_url":"https://api.github.com/repos/binaris/binaris/hooks","issue_events_url":"https://api.github.com/repos/binaris/binaris/issues/events{/number}","events_url":"https://api.github.com/repos/binaris/binaris/events","assignees_url":"https://api.github.com/repos/binaris/binaris/assignees{/user}","branches_url":"https://api.github.com/repos/binaris/binaris/branches{/branch}","tags_url":"https://api.github.com/repos/binaris/binaris/tags","blobs_url":"https://api.github.com/repos/binaris/binaris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binaris/binaris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binaris/binaris/git/refs{/sha}","trees_url":"https://api.github.com/repos/binaris/binaris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binaris/binaris/statuses/{sha}","languages_url":"https://api.github.com/repos/binaris/binaris/languages","stargazers_url":"https://api.github.com/repos/binaris/binaris/stargazers","contributors_url":"https://api.github.com/repos/binaris/binaris/contributors","subscribers_url":"https://api.github.com/repos/binaris/binaris/subscribers","subscription_url":"https://api.github.com/repos/binaris/binaris/subscription","commits_url":"https://api.github.com/repos/binaris/binaris/commits{/sha}","git_commits_url":"https://api.github.com/repos/binaris/binaris/git/commits{/sha}","comments_url":"https://api.github.com/repos/binaris/binaris/comments{/number}","issue_comment_url":"https://api.github.com/repos/binaris/binaris/issues/comments{/number}","contents_url":"https://api.github.com/repos/binaris/binaris/contents/{+path}","compare_url":"https://api.github.com/repos/binaris/binaris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binaris/binaris/merges","archive_url":"https://api.github.com/repos/binaris/binaris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binaris/binaris/downloads","issues_url":"https://api.github.com/repos/binaris/binaris/issues{/number}","pulls_url":"https://api.github.com/repos/binaris/binaris/pulls{/number}","milestones_url":"https://api.github.com/repos/binaris/binaris/milestones{/number}","notifications_url":"https://api.github.com/repos/binaris/binaris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binaris/binaris/labels{/name}","releases_url":"https://api.github.com/repos/binaris/binaris/releases{/id}","deployments_url":"https://api.github.com/repos/binaris/binaris/deployments","created_at":"2017-09-13T22:57:26Z","updated_at":"2018-12-03T14:54:36Z","pushed_at":"2018-12-06T15:30:49Z","git_url":"git://github.com/binaris/binaris.git","ssh_url":"git@github.com:binaris/binaris.git","clone_url":"https://github.com/binaris/binaris.git","svn_url":"https://github.com/binaris/binaris","homepage":"https://dev.binaris.com/","size":501,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":45,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":45,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/binaris/binaris/pulls/389"},"html":{"href":"https://github.com/binaris/binaris/pull/389"},"issue":{"href":"https://api.github.com/repos/binaris/binaris/issues/389"},"comments":{"href":"https://api.github.com/repos/binaris/binaris/issues/389/comments"},"review_comments":{"href":"https://api.github.com/repos/binaris/binaris/pulls/389/comments"},"review_comment":{"href":"https://api.github.com/repos/binaris/binaris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/binaris/binaris/pulls/389/commits"},"statuses":{"href":"https://api.github.com/repos/binaris/binaris/statuses/3671f9873676fa7ae1e995ef32dded647bf916e1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bergundy"}}