{"action":"created","comment":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/comments/37225309","id":37225309,"diff_hunk":"@@ -47,6 +50,24 @@ var argumentValidation = {\n     if (!callback || !_.isFunction(callback)) {\n       throw new Error('acquireToken requires a function callback parameter.');\n     }\n+  }, \n+\n+  validateUserCodeInfo : function(userCodeInfo) {\n+     if (!userCodeInfo){\n+        throw new Error('The userCodeInfo parameter is required');\n+     }\n+\n+     if (!userCodeInfo.hasOwnProperty(userCodeResponseFields.DEVICE_CODE)){","path":"lib/argument.js","position":21,"original_position":21,"commit_id":"880fbb47d7db90deee5a240558217f57bc69a3d6","original_commit_id":"880fbb47d7db90deee5a240558217f57bc69a3d6","user":{"login":"weijjia","id":1166233,"avatar_url":"https://avatars.githubusercontent.com/u/1166233?v=3","gravatar_id":"","url":"https://api.github.com/users/weijjia","html_url":"https://github.com/weijjia","followers_url":"https://api.github.com/users/weijjia/followers","following_url":"https://api.github.com/users/weijjia/following{/other_user}","gists_url":"https://api.github.com/users/weijjia/gists{/gist_id}","starred_url":"https://api.github.com/users/weijjia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weijjia/subscriptions","organizations_url":"https://api.github.com/users/weijjia/orgs","repos_url":"https://api.github.com/users/weijjia/repos","events_url":"https://api.github.com/users/weijjia/events{/privacy}","received_events_url":"https://api.github.com/users/weijjia/received_events","type":"User","site_admin":false},"body":"userCodeResponseFields is an constant, and before checing if userCodeInfo has the property of device_code, we've already check to make sure it's non-null. ","created_at":"2015-08-17T19:14:27Z","updated_at":"2015-08-17T19:14:27Z","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/pull/74#discussion_r37225309","pull_request_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/comments/37225309"},"html":{"href":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/pull/74#discussion_r37225309"},"pull_request":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74","id":42508702,"html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/pull/74","diff_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/pull/74.diff","patch_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/pull/74.patch","issue_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/74","number":74,"state":"open","locked":false,"title":"Dev command line interface","user":{"login":"weijjia","id":1166233,"avatar_url":"https://avatars.githubusercontent.com/u/1166233?v=3","gravatar_id":"","url":"https://api.github.com/users/weijjia","html_url":"https://github.com/weijjia","followers_url":"https://api.github.com/users/weijjia/followers","following_url":"https://api.github.com/users/weijjia/following{/other_user}","gists_url":"https://api.github.com/users/weijjia/gists{/gist_id}","starred_url":"https://api.github.com/users/weijjia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weijjia/subscriptions","organizations_url":"https://api.github.com/users/weijjia/orgs","repos_url":"https://api.github.com/users/weijjia/repos","events_url":"https://api.github.com/users/weijjia/events{/privacy}","received_events_url":"https://api.github.com/users/weijjia/received_events","type":"User","site_admin":false},"body":"add support for device code flow","created_at":"2015-08-15T00:01:59Z","updated_at":"2015-08-17T19:14:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"002b315ed13c4a1be5e60f4cb937ad7a8626774c","assignee":{"login":"aj-michael","id":7756476,"avatar_url":"https://avatars.githubusercontent.com/u/7756476?v=3","gravatar_id":"","url":"https://api.github.com/users/aj-michael","html_url":"https://github.com/aj-michael","followers_url":"https://api.github.com/users/aj-michael/followers","following_url":"https://api.github.com/users/aj-michael/following{/other_user}","gists_url":"https://api.github.com/users/aj-michael/gists{/gist_id}","starred_url":"https://api.github.com/users/aj-michael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aj-michael/subscriptions","organizations_url":"https://api.github.com/users/aj-michael/orgs","repos_url":"https://api.github.com/users/aj-michael/repos","events_url":"https://api.github.com/users/aj-michael/events{/privacy}","received_events_url":"https://api.github.com/users/aj-michael/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74/commits","review_comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74/comments","review_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/74/comments","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/statuses/880fbb47d7db90deee5a240558217f57bc69a3d6","head":{"label":"AzureAD:dev_commandLineInterface","ref":"dev_commandLineInterface","sha":"880fbb47d7db90deee5a240558217f57bc69a3d6","user":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"repo":{"id":17923502,"name":"azure-activedirectory-library-for-nodejs","full_name":"AzureAD/azure-activedirectory-library-for-nodejs","owner":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs","description":"","fork":false,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs","forks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/forks","keys_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/teams","hooks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/hooks","issue_events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/events","assignees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/tags","blobs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/languages","stargazers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/stargazers","contributors_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/contributors","subscribers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/subscribers","subscription_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/subscription","commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/merges","archive_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/downloads","issues_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/releases{/id}","created_at":"2014-03-19T22:57:40Z","updated_at":"2015-08-10T14:08:57Z","pushed_at":"2015-08-15T00:01:59Z","git_url":"git://github.com/AzureAD/azure-activedirectory-library-for-nodejs.git","ssh_url":"git@github.com:AzureAD/azure-activedirectory-library-for-nodejs.git","clone_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs.git","svn_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs","homepage":null,"size":699,"stargazers_count":20,"watchers_count":20,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":20,"default_branch":"master"}},"base":{"label":"AzureAD:dev","ref":"dev","sha":"84ed5dd8f7210cf46b7c7f437656291da12b1a3c","user":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"repo":{"id":17923502,"name":"azure-activedirectory-library-for-nodejs","full_name":"AzureAD/azure-activedirectory-library-for-nodejs","owner":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs","description":"","fork":false,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs","forks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/forks","keys_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/teams","hooks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/hooks","issue_events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/events","assignees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/tags","blobs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/languages","stargazers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/stargazers","contributors_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/contributors","subscribers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/subscribers","subscription_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/subscription","commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/merges","archive_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/downloads","issues_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/releases{/id}","created_at":"2014-03-19T22:57:40Z","updated_at":"2015-08-10T14:08:57Z","pushed_at":"2015-08-15T00:01:59Z","git_url":"git://github.com/AzureAD/azure-activedirectory-library-for-nodejs.git","ssh_url":"git@github.com:AzureAD/azure-activedirectory-library-for-nodejs.git","clone_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs.git","svn_url":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs","homepage":null,"size":699,"stargazers_count":20,"watchers_count":20,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74"},"html":{"href":"https://github.com/AzureAD/azure-activedirectory-library-for-nodejs/pull/74"},"issue":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/74"},"comments":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-nodejs/statuses/880fbb47d7db90deee5a240558217f57bc69a3d6"}}}}