{"action":"created","comment":{"url":"https://api.github.com/repos/Vestorly/torii/pulls/comments/46340067","id":46340067,"diff_hunk":"@@ -50,7 +50,7 @@ asyncTest(\"open resolves based on popup window\", function(){\n   var popupId = '09123-asdf';\n   var mockWindow = null\n \n-  popup = Popup.create({popupIdGenerator: buildPopupIdGenerator(popupId)});\n+  popup = new Popup({remoteIdGenerator: buildPopupIdGenerator(popupId)});","path":"test/tests/unit/services/popup-test.js","position":13,"original_position":13,"commit_id":"6a3005d631557434e4e2dfd3756e3afd5b267016","original_commit_id":"6a3005d631557434e4e2dfd3756e3afd5b267016","user":{"login":"mixonic","id":8752,"avatar_url":"https://avatars.githubusercontent.com/u/8752?v=3","gravatar_id":"","url":"https://api.github.com/users/mixonic","html_url":"https://github.com/mixonic","followers_url":"https://api.github.com/users/mixonic/followers","following_url":"https://api.github.com/users/mixonic/following{/other_user}","gists_url":"https://api.github.com/users/mixonic/gists{/gist_id}","starred_url":"https://api.github.com/users/mixonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixonic/subscriptions","organizations_url":"https://api.github.com/users/mixonic/orgs","repos_url":"https://api.github.com/users/mixonic/repos","events_url":"https://api.github.com/users/mixonic/events{/privacy}","received_events_url":"https://api.github.com/users/mixonic/received_events","type":"User","site_admin":false},"body":"We should definitely use `create`. Invocation of Ember objects with `new` is not actually public API (I thought it was so if you see any left here, my fault :-p)","created_at":"2015-12-01T21:16:49Z","updated_at":"2015-12-01T21:16:49Z","html_url":"https://github.com/Vestorly/torii/pull/250#discussion_r46340067","pull_request_url":"https://api.github.com/repos/Vestorly/torii/pulls/250","_links":{"self":{"href":"https://api.github.com/repos/Vestorly/torii/pulls/comments/46340067"},"html":{"href":"https://github.com/Vestorly/torii/pull/250#discussion_r46340067"},"pull_request":{"href":"https://api.github.com/repos/Vestorly/torii/pulls/250"}}},"pull_request":{"url":"https://api.github.com/repos/Vestorly/torii/pulls/250","id":50876928,"html_url":"https://github.com/Vestorly/torii/pull/250","diff_url":"https://github.com/Vestorly/torii/pull/250.diff","patch_url":"https://github.com/Vestorly/torii/pull/250.patch","issue_url":"https://api.github.com/repos/Vestorly/torii/issues/250","number":250,"state":"open","locked":false,"title":"Iframe Service","user":{"login":"jagthedrummer","id":58702,"avatar_url":"https://avatars.githubusercontent.com/u/58702?v=3","gravatar_id":"","url":"https://api.github.com/users/jagthedrummer","html_url":"https://github.com/jagthedrummer","followers_url":"https://api.github.com/users/jagthedrummer/followers","following_url":"https://api.github.com/users/jagthedrummer/following{/other_user}","gists_url":"https://api.github.com/users/jagthedrummer/gists{/gist_id}","starred_url":"https://api.github.com/users/jagthedrummer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagthedrummer/subscriptions","organizations_url":"https://api.github.com/users/jagthedrummer/orgs","repos_url":"https://api.github.com/users/jagthedrummer/repos","events_url":"https://api.github.com/users/jagthedrummer/events{/privacy}","received_events_url":"https://api.github.com/users/jagthedrummer/received_events","type":"User","site_admin":false},"body":"This is a freshly rebased branch of https://github.com/Vestorly/torii/pull/206\r\n\r\nThe basic overview, which is described in an update to the README is:\r\n\r\n## Using an iframe instead of a popup\r\n\r\nYou can configure torii to use an in-page iframe instead of a separate\r\npopup window for authentication. This can be done on either a global or\r\na per-provider basis.\r\n\r\nTo change this globally set the `remoteServiceName` variable in the main\r\ntorii config to be `'iframe'`.\r\n\r\n```JavaScript\r\n/* jshint node: true */\r\n// config/environment.js\r\nmodule.exports = function(environment) {\r\n  var ENV = {\r\n    /* ... */\r\n    torii: {\r\n      remoteServiceName: 'iframe',\r\n      providers: { /* ... */ }\r\n    }\r\n  };\r\n  return ENV;\r\n};\r\n```\r\n\r\nIf you only want the iframe for a single provider you can include the\r\n`remoteServiceName` value in the configuration for that provider.\r\n\r\n```JavaScript\r\n/* jshint node: true */\r\n// config/environment.js\r\nmodule.exports = function(environment) {\r\n  var ENV = {\r\n    /* ... */\r\n    torii: {\r\n      // a 'session' property will be injected on routes and controllers\r\n      sessionServiceName: 'session',\r\n      providers: {\r\n        'mycorp-oauth2': {\r\n          remoteServiceName: 'iframe'\r\n          /* ... */\r\n        }\r\n      }\r\n    }\r\n  };\r\n  return ENV;\r\n};\r\n```\r\n\r\nOnce your provider has been configured you need to tell torii where to\r\napend the iframe when you call `session.open`.\r\n\r\nFor instance:\r\n\r\n```JavaScript\r\nthis.get(\"session\")\r\n  .open(\"mycorp-oauth2\",{ iframeParent : '#signin-modal-content'})\r\n  .then(function(){\r\n    // ...\r\n  });\r\n```\r\n\r\nOf course, the element with the id of `signin-modal-content` needs to be\r\ncurrently in the DOM.\r\n\r\n/end of README excerpt\r\n\r\n---\r\n\r\nInstead of requiring the `iframeParent` argument to be passed to `open` we might include a component that people can include in a template to tell torii where to put the iframe. Something like:\r\n\r\n```handlebars\r\n{{torii-iframe-placeholder}}\r\n```\r\n\r\nI took a stab at making this happen, but so far I haven't been able to get the component to be useable in the host app. I suspect that this is related to the custom build system and the fact that I don't entirely understand how it works and how it's different from ember-cli based add-ons. Would love some pointers on that note.","created_at":"2015-11-16T22:35:50Z","updated_at":"2015-12-01T21:16:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"304f16ab85493e61705656e4ed54a40f966662ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Vestorly/torii/pulls/250/commits","review_comments_url":"https://api.github.com/repos/Vestorly/torii/pulls/250/comments","review_comment_url":"https://api.github.com/repos/Vestorly/torii/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vestorly/torii/issues/250/comments","statuses_url":"https://api.github.com/repos/Vestorly/torii/statuses/6a3005d631557434e4e2dfd3756e3afd5b267016","head":{"label":"jagthedrummer:jeremy/iframe-rebased","ref":"jeremy/iframe-rebased","sha":"6a3005d631557434e4e2dfd3756e3afd5b267016","user":{"login":"jagthedrummer","id":58702,"avatar_url":"https://avatars.githubusercontent.com/u/58702?v=3","gravatar_id":"","url":"https://api.github.com/users/jagthedrummer","html_url":"https://github.com/jagthedrummer","followers_url":"https://api.github.com/users/jagthedrummer/followers","following_url":"https://api.github.com/users/jagthedrummer/following{/other_user}","gists_url":"https://api.github.com/users/jagthedrummer/gists{/gist_id}","starred_url":"https://api.github.com/users/jagthedrummer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagthedrummer/subscriptions","organizations_url":"https://api.github.com/users/jagthedrummer/orgs","repos_url":"https://api.github.com/users/jagthedrummer/repos","events_url":"https://api.github.com/users/jagthedrummer/events{/privacy}","received_events_url":"https://api.github.com/users/jagthedrummer/received_events","type":"User","site_admin":false},"repo":{"id":39116351,"name":"torii","full_name":"jagthedrummer/torii","owner":{"login":"jagthedrummer","id":58702,"avatar_url":"https://avatars.githubusercontent.com/u/58702?v=3","gravatar_id":"","url":"https://api.github.com/users/jagthedrummer","html_url":"https://github.com/jagthedrummer","followers_url":"https://api.github.com/users/jagthedrummer/followers","following_url":"https://api.github.com/users/jagthedrummer/following{/other_user}","gists_url":"https://api.github.com/users/jagthedrummer/gists{/gist_id}","starred_url":"https://api.github.com/users/jagthedrummer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagthedrummer/subscriptions","organizations_url":"https://api.github.com/users/jagthedrummer/orgs","repos_url":"https://api.github.com/users/jagthedrummer/repos","events_url":"https://api.github.com/users/jagthedrummer/events{/privacy}","received_events_url":"https://api.github.com/users/jagthedrummer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jagthedrummer/torii","description":"A set of clean abstractions for authentication in Ember.js","fork":true,"url":"https://api.github.com/repos/jagthedrummer/torii","forks_url":"https://api.github.com/repos/jagthedrummer/torii/forks","keys_url":"https://api.github.com/repos/jagthedrummer/torii/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jagthedrummer/torii/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jagthedrummer/torii/teams","hooks_url":"https://api.github.com/repos/jagthedrummer/torii/hooks","issue_events_url":"https://api.github.com/repos/jagthedrummer/torii/issues/events{/number}","events_url":"https://api.github.com/repos/jagthedrummer/torii/events","assignees_url":"https://api.github.com/repos/jagthedrummer/torii/assignees{/user}","branches_url":"https://api.github.com/repos/jagthedrummer/torii/branches{/branch}","tags_url":"https://api.github.com/repos/jagthedrummer/torii/tags","blobs_url":"https://api.github.com/repos/jagthedrummer/torii/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jagthedrummer/torii/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jagthedrummer/torii/git/refs{/sha}","trees_url":"https://api.github.com/repos/jagthedrummer/torii/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jagthedrummer/torii/statuses/{sha}","languages_url":"https://api.github.com/repos/jagthedrummer/torii/languages","stargazers_url":"https://api.github.com/repos/jagthedrummer/torii/stargazers","contributors_url":"https://api.github.com/repos/jagthedrummer/torii/contributors","subscribers_url":"https://api.github.com/repos/jagthedrummer/torii/subscribers","subscription_url":"https://api.github.com/repos/jagthedrummer/torii/subscription","commits_url":"https://api.github.com/repos/jagthedrummer/torii/commits{/sha}","git_commits_url":"https://api.github.com/repos/jagthedrummer/torii/git/commits{/sha}","comments_url":"https://api.github.com/repos/jagthedrummer/torii/comments{/number}","issue_comment_url":"https://api.github.com/repos/jagthedrummer/torii/issues/comments{/number}","contents_url":"https://api.github.com/repos/jagthedrummer/torii/contents/{+path}","compare_url":"https://api.github.com/repos/jagthedrummer/torii/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jagthedrummer/torii/merges","archive_url":"https://api.github.com/repos/jagthedrummer/torii/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jagthedrummer/torii/downloads","issues_url":"https://api.github.com/repos/jagthedrummer/torii/issues{/number}","pulls_url":"https://api.github.com/repos/jagthedrummer/torii/pulls{/number}","milestones_url":"https://api.github.com/repos/jagthedrummer/torii/milestones{/number}","notifications_url":"https://api.github.com/repos/jagthedrummer/torii/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jagthedrummer/torii/labels{/name}","releases_url":"https://api.github.com/repos/jagthedrummer/torii/releases{/id}","created_at":"2015-07-15T04:33:14Z","updated_at":"2015-11-06T10:48:34Z","pushed_at":"2015-11-16T22:28:44Z","git_url":"git://github.com/jagthedrummer/torii.git","ssh_url":"git@github.com:jagthedrummer/torii.git","clone_url":"https://github.com/jagthedrummer/torii.git","svn_url":"https://github.com/jagthedrummer/torii","homepage":"vestorly.github.io/torii","size":2482,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"Vestorly:master","ref":"master","sha":"d0f4d2e740b65310c29aa83dba9a9a8bbd540fc6","user":{"login":"Vestorly","id":1341524,"avatar_url":"https://avatars.githubusercontent.com/u/1341524?v=3","gravatar_id":"","url":"https://api.github.com/users/Vestorly","html_url":"https://github.com/Vestorly","followers_url":"https://api.github.com/users/Vestorly/followers","following_url":"https://api.github.com/users/Vestorly/following{/other_user}","gists_url":"https://api.github.com/users/Vestorly/gists{/gist_id}","starred_url":"https://api.github.com/users/Vestorly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vestorly/subscriptions","organizations_url":"https://api.github.com/users/Vestorly/orgs","repos_url":"https://api.github.com/users/Vestorly/repos","events_url":"https://api.github.com/users/Vestorly/events{/privacy}","received_events_url":"https://api.github.com/users/Vestorly/received_events","type":"Organization","site_admin":false},"repo":{"id":18303148,"name":"torii","full_name":"Vestorly/torii","owner":{"login":"Vestorly","id":1341524,"avatar_url":"https://avatars.githubusercontent.com/u/1341524?v=3","gravatar_id":"","url":"https://api.github.com/users/Vestorly","html_url":"https://github.com/Vestorly","followers_url":"https://api.github.com/users/Vestorly/followers","following_url":"https://api.github.com/users/Vestorly/following{/other_user}","gists_url":"https://api.github.com/users/Vestorly/gists{/gist_id}","starred_url":"https://api.github.com/users/Vestorly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vestorly/subscriptions","organizations_url":"https://api.github.com/users/Vestorly/orgs","repos_url":"https://api.github.com/users/Vestorly/repos","events_url":"https://api.github.com/users/Vestorly/events{/privacy}","received_events_url":"https://api.github.com/users/Vestorly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Vestorly/torii","description":"A set of clean abstractions for authentication in Ember.js","fork":false,"url":"https://api.github.com/repos/Vestorly/torii","forks_url":"https://api.github.com/repos/Vestorly/torii/forks","keys_url":"https://api.github.com/repos/Vestorly/torii/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vestorly/torii/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vestorly/torii/teams","hooks_url":"https://api.github.com/repos/Vestorly/torii/hooks","issue_events_url":"https://api.github.com/repos/Vestorly/torii/issues/events{/number}","events_url":"https://api.github.com/repos/Vestorly/torii/events","assignees_url":"https://api.github.com/repos/Vestorly/torii/assignees{/user}","branches_url":"https://api.github.com/repos/Vestorly/torii/branches{/branch}","tags_url":"https://api.github.com/repos/Vestorly/torii/tags","blobs_url":"https://api.github.com/repos/Vestorly/torii/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vestorly/torii/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vestorly/torii/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vestorly/torii/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vestorly/torii/statuses/{sha}","languages_url":"https://api.github.com/repos/Vestorly/torii/languages","stargazers_url":"https://api.github.com/repos/Vestorly/torii/stargazers","contributors_url":"https://api.github.com/repos/Vestorly/torii/contributors","subscribers_url":"https://api.github.com/repos/Vestorly/torii/subscribers","subscription_url":"https://api.github.com/repos/Vestorly/torii/subscription","commits_url":"https://api.github.com/repos/Vestorly/torii/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vestorly/torii/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vestorly/torii/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vestorly/torii/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vestorly/torii/contents/{+path}","compare_url":"https://api.github.com/repos/Vestorly/torii/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vestorly/torii/merges","archive_url":"https://api.github.com/repos/Vestorly/torii/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vestorly/torii/downloads","issues_url":"https://api.github.com/repos/Vestorly/torii/issues{/number}","pulls_url":"https://api.github.com/repos/Vestorly/torii/pulls{/number}","milestones_url":"https://api.github.com/repos/Vestorly/torii/milestones{/number}","notifications_url":"https://api.github.com/repos/Vestorly/torii/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vestorly/torii/labels{/name}","releases_url":"https://api.github.com/repos/Vestorly/torii/releases{/id}","created_at":"2014-03-31T18:16:42Z","updated_at":"2015-12-01T16:43:16Z","pushed_at":"2015-11-16T22:35:51Z","git_url":"git://github.com/Vestorly/torii.git","ssh_url":"git@github.com:Vestorly/torii.git","clone_url":"https://github.com/Vestorly/torii.git","svn_url":"https://github.com/Vestorly/torii","homepage":"vestorly.github.io/torii","size":4013,"stargazers_count":591,"watchers_count":591,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":91,"mirror_url":null,"open_issues_count":36,"forks":91,"open_issues":36,"watchers":591,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vestorly/torii/pulls/250"},"html":{"href":"https://github.com/Vestorly/torii/pull/250"},"issue":{"href":"https://api.github.com/repos/Vestorly/torii/issues/250"},"comments":{"href":"https://api.github.com/repos/Vestorly/torii/issues/250/comments"},"review_comments":{"href":"https://api.github.com/repos/Vestorly/torii/pulls/250/comments"},"review_comment":{"href":"https://api.github.com/repos/Vestorly/torii/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vestorly/torii/pulls/250/commits"},"statuses":{"href":"https://api.github.com/repos/Vestorly/torii/statuses/6a3005d631557434e4e2dfd3756e3afd5b267016"}}}}