{"action":"created","comment":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/comments/42491913","id":42491913,"diff_hunk":"@@ -25,16 +22,11 @@ var client, application, account, group = null;\n var accountEmail = unique('jlpicard') + '@mailinator.com';\n \n // ==================================================\n-// Step 1 - Load the API Key file and create a Client\n+// Step 1 - Create a client and wait for it to ready","path":"quickstart.js","position":15,"original_position":15,"commit_id":"f87061b72aed409d9638badb3f2d4b32963b38fe","original_commit_id":"f87061b72aed409d9638badb3f2d4b32963b38fe","user":{"login":"timothyej","id":721091,"avatar_url":"https://avatars.githubusercontent.com/u/721091?v=3","gravatar_id":"","url":"https://api.github.com/users/timothyej","html_url":"https://github.com/timothyej","followers_url":"https://api.github.com/users/timothyej/followers","following_url":"https://api.github.com/users/timothyej/following{/other_user}","gists_url":"https://api.github.com/users/timothyej/gists{/gist_id}","starred_url":"https://api.github.com/users/timothyej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothyej/subscriptions","organizations_url":"https://api.github.com/users/timothyej/orgs","repos_url":"https://api.github.com/users/timothyej/repos","events_url":"https://api.github.com/users/timothyej/events{/privacy}","received_events_url":"https://api.github.com/users/timothyej/received_events","type":"User","site_admin":false},"body":"Typo: `...and wait for it to _get_ ready` maybe? :)","created_at":"2015-10-20T13:05:55Z","updated_at":"2015-10-20T13:05:55Z","html_url":"https://github.com/stormpath/stormpath-sdk-node/pull/248#discussion_r42491913","pull_request_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248","_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/comments/42491913"},"html":{"href":"https://github.com/stormpath/stormpath-sdk-node/pull/248#discussion_r42491913"},"pull_request":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248"}}},"pull_request":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248","id":48188227,"html_url":"https://github.com/stormpath/stormpath-sdk-node/pull/248","diff_url":"https://github.com/stormpath/stormpath-sdk-node/pull/248.diff","patch_url":"https://github.com/stormpath/stormpath-sdk-node/pull/248.patch","issue_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/248","number":248,"state":"open","locked":false,"title":"Feature: Async scope factory","user":{"login":"typerandom","id":1331778,"avatar_url":"https://avatars.githubusercontent.com/u/1331778?v=3","gravatar_id":"","url":"https://api.github.com/users/typerandom","html_url":"https://github.com/typerandom","followers_url":"https://api.github.com/users/typerandom/followers","following_url":"https://api.github.com/users/typerandom/following{/other_user}","gists_url":"https://api.github.com/users/typerandom/gists{/gist_id}","starred_url":"https://api.github.com/users/typerandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typerandom/subscriptions","organizations_url":"https://api.github.com/users/typerandom/orgs","repos_url":"https://api.github.com/users/typerandom/repos","events_url":"https://api.github.com/users/typerandom/events{/privacy}","received_events_url":"https://api.github.com/users/typerandom/received_events","type":"User","site_admin":false},"body":"Adds the ability for a OAuthBasicExchangeAuthenticator scope factory to resolve scopes asynchronously.\r\n\r\nPreviously it was only possible for scopes to be resolved synchronously by the scope factory. As shown below:\r\n\r\n```js\r\napp.authenticateApiRequest({\r\n  scopeFactory: function(account, requestedScope){\r\n    return ['myscope'];\r\n  }\r\n}, onResult);\r\n```\r\n\r\nBut now it's also possible to do so by calling the optional callback argument. As shown below:\r\n\r\n```js\r\napp.authenticateApiRequest({\r\n  scopeFactory: function(account, requestedScope, callback){\r\n    callback(null, ['myscope']);\r\n  }\r\n}, onResult);\r\n```\r\n\r\n**Note:** If the scope factory returns a value (not undefined) then it is assumed that this is the scope result. Else it is assumed that the scope result will be provided through the provided callback. The reason that both cases are supported is because of backward compatibility.\r\n\r\nCloses #171.","created_at":"2015-10-20T11:32:33Z","updated_at":"2015-10-20T13:05:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84fbbad9642132907ee61e3db6629ae0885c74cd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248/commits","review_comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248/comments","review_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/248/comments","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/statuses/f87061b72aed409d9638badb3f2d4b32963b38fe","head":{"label":"stormpath:feature-async-scope-factory","ref":"feature-async-scope-factory","sha":"f87061b72aed409d9638badb3f2d4b32963b38fe","user":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"repo":{"id":16016386,"name":"stormpath-sdk-node","full_name":"stormpath/stormpath-sdk-node","owner":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stormpath/stormpath-sdk-node","description":"Official Node.js SDK for the Stormpath User Management REST API","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath-sdk-node","forks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/releases{/id}","created_at":"2014-01-18T01:03:26Z","updated_at":"2015-10-07T04:14:02Z","pushed_at":"2015-10-20T13:03:14Z","git_url":"git://github.com/stormpath/stormpath-sdk-node.git","ssh_url":"git@github.com:stormpath/stormpath-sdk-node.git","clone_url":"https://github.com/stormpath/stormpath-sdk-node.git","svn_url":"https://github.com/stormpath/stormpath-sdk-node","homepage":null,"size":3230,"stargazers_count":63,"watchers_count":63,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":40,"forks":22,"open_issues":40,"watchers":63,"default_branch":"master"}},"base":{"label":"stormpath:master","ref":"master","sha":"90379f4a78c462bb946ff2d6303495fe2ee1cbdb","user":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"repo":{"id":16016386,"name":"stormpath-sdk-node","full_name":"stormpath/stormpath-sdk-node","owner":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=3","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stormpath/stormpath-sdk-node","description":"Official Node.js SDK for the Stormpath User Management REST API","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath-sdk-node","forks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath-sdk-node/releases{/id}","created_at":"2014-01-18T01:03:26Z","updated_at":"2015-10-07T04:14:02Z","pushed_at":"2015-10-20T13:03:14Z","git_url":"git://github.com/stormpath/stormpath-sdk-node.git","ssh_url":"git@github.com:stormpath/stormpath-sdk-node.git","clone_url":"https://github.com/stormpath/stormpath-sdk-node.git","svn_url":"https://github.com/stormpath/stormpath-sdk-node","homepage":null,"size":3230,"stargazers_count":63,"watchers_count":63,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":40,"forks":22,"open_issues":40,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248"},"html":{"href":"https://github.com/stormpath/stormpath-sdk-node/pull/248"},"issue":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/248"},"comments":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-node/statuses/f87061b72aed409d9638badb3f2d4b32963b38fe"}}}}