{"action":"created","comment":{"url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/comments/238946936","pull_request_review_id":181610103,"id":238946936,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODk0NjkzNg==","diff_hunk":"@@ -0,0 +1,52 @@\n+package ssohandler\n+\n+import (\n+\t\"io\"\n+\t\"net/http\"\n+\n+\t\"github.com/skygeario/skygear-server/pkg/auth\"\n+\t\"github.com/skygeario/skygear-server/pkg/auth/dependency/sso\"\n+\t\"github.com/skygeario/skygear-server/pkg/core/auth/authz\"\n+\t\"github.com/skygeario/skygear-server/pkg/core/auth/authz/policy\"\n+\t\"github.com/skygeario/skygear-server/pkg/core/inject\"\n+\t\"github.com/skygeario/skygear-server/pkg/core/server\"\n+)\n+\n+func AttachIFrameHandlerFactory(\n+\tserver *server.Server,\n+\tauthDependency auth.DependencyMap,\n+) *server.Server {\n+\tserver.Handle(\"/sso/iframe_handler\", &IFrameHandlerFactory{\n+\t\tauthDependency,\n+\t}).Methods(\"GET\")","path":"pkg/auth/handler/ssohandler/iframe_handler.go","position":21,"original_position":21,"commit_id":"06ff428241fde5e4ef30bfc67cceca32b6033723","original_commit_id":"06ff428241fde5e4ef30bfc67cceca32b6033723","user":{"login":"carmenlau","id":388892,"node_id":"MDQ6VXNlcjM4ODg5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/388892?v=4","gravatar_id":"","url":"https://api.github.com/users/carmenlau","html_url":"https://github.com/carmenlau","followers_url":"https://api.github.com/users/carmenlau/followers","following_url":"https://api.github.com/users/carmenlau/following{/other_user}","gists_url":"https://api.github.com/users/carmenlau/gists{/gist_id}","starred_url":"https://api.github.com/users/carmenlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmenlau/subscriptions","organizations_url":"https://api.github.com/users/carmenlau/orgs","repos_url":"https://api.github.com/users/carmenlau/repos","events_url":"https://api.github.com/users/carmenlau/events{/privacy}","received_events_url":"https://api.github.com/users/carmenlau/received_events","type":"User","site_admin":false},"body":"Since the endpoint is the iframe source but not an `XMLHttpRequest`, so pre-flight request should not be needed. \r\n\r\nIn the login flow, this endpoint has js script to call `/sso/config` api to send the result back to the parent window. Since in `iframe_handler`, we initialized the js sdk without api key and `/sso/config` should not be api key required. ","created_at":"2018-12-05T06:49:37Z","updated_at":"2018-12-05T06:49:37Z","html_url":"https://github.com/SkygearIO/skygear-server/pull/827#discussion_r238946936","pull_request_url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/comments/238946936"},"html":{"href":"https://github.com/SkygearIO/skygear-server/pull/827#discussion_r238946936"},"pull_request":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827"}},"in_reply_to_id":238909969},"pull_request":{"url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827","id":235710566,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1NzEwNTY2","html_url":"https://github.com/SkygearIO/skygear-server/pull/827","diff_url":"https://github.com/SkygearIO/skygear-server/pull/827.diff","patch_url":"https://github.com/SkygearIO/skygear-server/pull/827.patch","issue_url":"https://api.github.com/repos/SkygearIO/skygear-server/issues/827","number":827,"state":"open","locked":false,"title":"next: sso iframe handler","user":{"login":"carmenlau","id":388892,"node_id":"MDQ6VXNlcjM4ODg5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/388892?v=4","gravatar_id":"","url":"https://api.github.com/users/carmenlau","html_url":"https://github.com/carmenlau","followers_url":"https://api.github.com/users/carmenlau/followers","following_url":"https://api.github.com/users/carmenlau/following{/other_user}","gists_url":"https://api.github.com/users/carmenlau/gists{/gist_id}","starred_url":"https://api.github.com/users/carmenlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmenlau/subscriptions","organizations_url":"https://api.github.com/users/carmenlau/orgs","repos_url":"https://api.github.com/users/carmenlau/repos","events_url":"https://api.github.com/users/carmenlau/events{/privacy}","received_events_url":"https://api.github.com/users/carmenlau/received_events","type":"User","site_admin":false},"body":"connect #785 ","created_at":"2018-12-04T07:53:24Z","updated_at":"2018-12-05T06:49:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfe6a8cdbc6f4c562ca42b16326dd00548f781cc","assignee":{"login":"Steven-Chan","id":12228201,"node_id":"MDQ6VXNlcjEyMjI4MjAx","avatar_url":"https://avatars1.githubusercontent.com/u/12228201?v=4","gravatar_id":"","url":"https://api.github.com/users/Steven-Chan","html_url":"https://github.com/Steven-Chan","followers_url":"https://api.github.com/users/Steven-Chan/followers","following_url":"https://api.github.com/users/Steven-Chan/following{/other_user}","gists_url":"https://api.github.com/users/Steven-Chan/gists{/gist_id}","starred_url":"https://api.github.com/users/Steven-Chan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Steven-Chan/subscriptions","organizations_url":"https://api.github.com/users/Steven-Chan/orgs","repos_url":"https://api.github.com/users/Steven-Chan/repos","events_url":"https://api.github.com/users/Steven-Chan/events{/privacy}","received_events_url":"https://api.github.com/users/Steven-Chan/received_events","type":"User","site_admin":false},"assignees":[{"login":"Steven-Chan","id":12228201,"node_id":"MDQ6VXNlcjEyMjI4MjAx","avatar_url":"https://avatars1.githubusercontent.com/u/12228201?v=4","gravatar_id":"","url":"https://api.github.com/users/Steven-Chan","html_url":"https://github.com/Steven-Chan","followers_url":"https://api.github.com/users/Steven-Chan/followers","following_url":"https://api.github.com/users/Steven-Chan/following{/other_user}","gists_url":"https://api.github.com/users/Steven-Chan/gists{/gist_id}","starred_url":"https://api.github.com/users/Steven-Chan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Steven-Chan/subscriptions","organizations_url":"https://api.github.com/users/Steven-Chan/orgs","repos_url":"https://api.github.com/users/Steven-Chan/repos","events_url":"https://api.github.com/users/Steven-Chan/events{/privacy}","received_events_url":"https://api.github.com/users/Steven-Chan/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1041247475,"node_id":"MDU6TGFiZWwxMDQxMjQ3NDc1","url":"https://api.github.com/repos/SkygearIO/skygear-server/labels/workflow/Review","name":"workflow/Review","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827/commits","review_comments_url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827/comments","review_comment_url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SkygearIO/skygear-server/issues/827/comments","statuses_url":"https://api.github.com/repos/SkygearIO/skygear-server/statuses/06ff428241fde5e4ef30bfc67cceca32b6033723","head":{"label":"carmenlau:next-sso-iframe-handler","ref":"next-sso-iframe-handler","sha":"06ff428241fde5e4ef30bfc67cceca32b6033723","user":{"login":"carmenlau","id":388892,"node_id":"MDQ6VXNlcjM4ODg5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/388892?v=4","gravatar_id":"","url":"https://api.github.com/users/carmenlau","html_url":"https://github.com/carmenlau","followers_url":"https://api.github.com/users/carmenlau/followers","following_url":"https://api.github.com/users/carmenlau/following{/other_user}","gists_url":"https://api.github.com/users/carmenlau/gists{/gist_id}","starred_url":"https://api.github.com/users/carmenlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmenlau/subscriptions","organizations_url":"https://api.github.com/users/carmenlau/orgs","repos_url":"https://api.github.com/users/carmenlau/repos","events_url":"https://api.github.com/users/carmenlau/events{/privacy}","received_events_url":"https://api.github.com/users/carmenlau/received_events","type":"User","site_admin":false},"repo":{"id":103038374,"node_id":"MDEwOlJlcG9zaXRvcnkxMDMwMzgzNzQ=","name":"skygear-server","full_name":"carmenlau/skygear-server","private":false,"owner":{"login":"carmenlau","id":388892,"node_id":"MDQ6VXNlcjM4ODg5Mg==","avatar_url":"https://avatars2.githubusercontent.com/u/388892?v=4","gravatar_id":"","url":"https://api.github.com/users/carmenlau","html_url":"https://github.com/carmenlau","followers_url":"https://api.github.com/users/carmenlau/followers","following_url":"https://api.github.com/users/carmenlau/following{/other_user}","gists_url":"https://api.github.com/users/carmenlau/gists{/gist_id}","starred_url":"https://api.github.com/users/carmenlau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carmenlau/subscriptions","organizations_url":"https://api.github.com/users/carmenlau/orgs","repos_url":"https://api.github.com/users/carmenlau/repos","events_url":"https://api.github.com/users/carmenlau/events{/privacy}","received_events_url":"https://api.github.com/users/carmenlau/received_events","type":"User","site_admin":false},"html_url":"https://github.com/carmenlau/skygear-server","description":"Skygear Server - Open-source Mobile Backend, making app development easier.","fork":true,"url":"https://api.github.com/repos/carmenlau/skygear-server","forks_url":"https://api.github.com/repos/carmenlau/skygear-server/forks","keys_url":"https://api.github.com/repos/carmenlau/skygear-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carmenlau/skygear-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carmenlau/skygear-server/teams","hooks_url":"https://api.github.com/repos/carmenlau/skygear-server/hooks","issue_events_url":"https://api.github.com/repos/carmenlau/skygear-server/issues/events{/number}","events_url":"https://api.github.com/repos/carmenlau/skygear-server/events","assignees_url":"https://api.github.com/repos/carmenlau/skygear-server/assignees{/user}","branches_url":"https://api.github.com/repos/carmenlau/skygear-server/branches{/branch}","tags_url":"https://api.github.com/repos/carmenlau/skygear-server/tags","blobs_url":"https://api.github.com/repos/carmenlau/skygear-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carmenlau/skygear-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carmenlau/skygear-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/carmenlau/skygear-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carmenlau/skygear-server/statuses/{sha}","languages_url":"https://api.github.com/repos/carmenlau/skygear-server/languages","stargazers_url":"https://api.github.com/repos/carmenlau/skygear-server/stargazers","contributors_url":"https://api.github.com/repos/carmenlau/skygear-server/contributors","subscribers_url":"https://api.github.com/repos/carmenlau/skygear-server/subscribers","subscription_url":"https://api.github.com/repos/carmenlau/skygear-server/subscription","commits_url":"https://api.github.com/repos/carmenlau/skygear-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/carmenlau/skygear-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/carmenlau/skygear-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/carmenlau/skygear-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/carmenlau/skygear-server/contents/{+path}","compare_url":"https://api.github.com/repos/carmenlau/skygear-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carmenlau/skygear-server/merges","archive_url":"https://api.github.com/repos/carmenlau/skygear-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carmenlau/skygear-server/downloads","issues_url":"https://api.github.com/repos/carmenlau/skygear-server/issues{/number}","pulls_url":"https://api.github.com/repos/carmenlau/skygear-server/pulls{/number}","milestones_url":"https://api.github.com/repos/carmenlau/skygear-server/milestones{/number}","notifications_url":"https://api.github.com/repos/carmenlau/skygear-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carmenlau/skygear-server/labels{/name}","releases_url":"https://api.github.com/repos/carmenlau/skygear-server/releases{/id}","deployments_url":"https://api.github.com/repos/carmenlau/skygear-server/deployments","created_at":"2017-09-10T15:03:20Z","updated_at":"2017-09-10T15:03:22Z","pushed_at":"2018-12-04T10:48:44Z","git_url":"git://github.com/carmenlau/skygear-server.git","ssh_url":"git@github.com:carmenlau/skygear-server.git","clone_url":"https://github.com/carmenlau/skygear-server.git","svn_url":"https://github.com/carmenlau/skygear-server","homepage":"https://skygear.io","size":3699,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SkygearIO:next","ref":"next","sha":"b9f5a9bbaa9c1b3cfc31b789d5359b0da8d013ef","user":{"login":"SkygearIO","id":15025887,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDI1ODg3","avatar_url":"https://avatars1.githubusercontent.com/u/15025887?v=4","gravatar_id":"","url":"https://api.github.com/users/SkygearIO","html_url":"https://github.com/SkygearIO","followers_url":"https://api.github.com/users/SkygearIO/followers","following_url":"https://api.github.com/users/SkygearIO/following{/other_user}","gists_url":"https://api.github.com/users/SkygearIO/gists{/gist_id}","starred_url":"https://api.github.com/users/SkygearIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SkygearIO/subscriptions","organizations_url":"https://api.github.com/users/SkygearIO/orgs","repos_url":"https://api.github.com/users/SkygearIO/repos","events_url":"https://api.github.com/users/SkygearIO/events{/privacy}","received_events_url":"https://api.github.com/users/SkygearIO/received_events","type":"Organization","site_admin":false},"repo":{"id":54106815,"node_id":"MDEwOlJlcG9zaXRvcnk1NDEwNjgxNQ==","name":"skygear-server","full_name":"SkygearIO/skygear-server","private":false,"owner":{"login":"SkygearIO","id":15025887,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MDI1ODg3","avatar_url":"https://avatars1.githubusercontent.com/u/15025887?v=4","gravatar_id":"","url":"https://api.github.com/users/SkygearIO","html_url":"https://github.com/SkygearIO","followers_url":"https://api.github.com/users/SkygearIO/followers","following_url":"https://api.github.com/users/SkygearIO/following{/other_user}","gists_url":"https://api.github.com/users/SkygearIO/gists{/gist_id}","starred_url":"https://api.github.com/users/SkygearIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SkygearIO/subscriptions","organizations_url":"https://api.github.com/users/SkygearIO/orgs","repos_url":"https://api.github.com/users/SkygearIO/repos","events_url":"https://api.github.com/users/SkygearIO/events{/privacy}","received_events_url":"https://api.github.com/users/SkygearIO/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SkygearIO/skygear-server","description":"Skygear Server - Open-source Mobile Backend, making app development easier.","fork":false,"url":"https://api.github.com/repos/SkygearIO/skygear-server","forks_url":"https://api.github.com/repos/SkygearIO/skygear-server/forks","keys_url":"https://api.github.com/repos/SkygearIO/skygear-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SkygearIO/skygear-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SkygearIO/skygear-server/teams","hooks_url":"https://api.github.com/repos/SkygearIO/skygear-server/hooks","issue_events_url":"https://api.github.com/repos/SkygearIO/skygear-server/issues/events{/number}","events_url":"https://api.github.com/repos/SkygearIO/skygear-server/events","assignees_url":"https://api.github.com/repos/SkygearIO/skygear-server/assignees{/user}","branches_url":"https://api.github.com/repos/SkygearIO/skygear-server/branches{/branch}","tags_url":"https://api.github.com/repos/SkygearIO/skygear-server/tags","blobs_url":"https://api.github.com/repos/SkygearIO/skygear-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SkygearIO/skygear-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SkygearIO/skygear-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/SkygearIO/skygear-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SkygearIO/skygear-server/statuses/{sha}","languages_url":"https://api.github.com/repos/SkygearIO/skygear-server/languages","stargazers_url":"https://api.github.com/repos/SkygearIO/skygear-server/stargazers","contributors_url":"https://api.github.com/repos/SkygearIO/skygear-server/contributors","subscribers_url":"https://api.github.com/repos/SkygearIO/skygear-server/subscribers","subscription_url":"https://api.github.com/repos/SkygearIO/skygear-server/subscription","commits_url":"https://api.github.com/repos/SkygearIO/skygear-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/SkygearIO/skygear-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/SkygearIO/skygear-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/SkygearIO/skygear-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/SkygearIO/skygear-server/contents/{+path}","compare_url":"https://api.github.com/repos/SkygearIO/skygear-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SkygearIO/skygear-server/merges","archive_url":"https://api.github.com/repos/SkygearIO/skygear-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SkygearIO/skygear-server/downloads","issues_url":"https://api.github.com/repos/SkygearIO/skygear-server/issues{/number}","pulls_url":"https://api.github.com/repos/SkygearIO/skygear-server/pulls{/number}","milestones_url":"https://api.github.com/repos/SkygearIO/skygear-server/milestones{/number}","notifications_url":"https://api.github.com/repos/SkygearIO/skygear-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SkygearIO/skygear-server/labels{/name}","releases_url":"https://api.github.com/repos/SkygearIO/skygear-server/releases{/id}","deployments_url":"https://api.github.com/repos/SkygearIO/skygear-server/deployments","created_at":"2016-03-17T09:48:42Z","updated_at":"2018-11-18T02:13:01Z","pushed_at":"2018-12-05T06:31:50Z","git_url":"git://github.com/SkygearIO/skygear-server.git","ssh_url":"git@github.com:SkygearIO/skygear-server.git","clone_url":"https://github.com/SkygearIO/skygear-server.git","svn_url":"https://github.com/SkygearIO/skygear-server","homepage":"https://skygear.io","size":3710,"stargazers_count":314,"watchers_count":314,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":73,"mirror_url":null,"archived":false,"open_issues_count":131,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":73,"open_issues":131,"watchers":314,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827"},"html":{"href":"https://github.com/SkygearIO/skygear-server/pull/827"},"issue":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/issues/827"},"comments":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/issues/827/comments"},"review_comments":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827/comments"},"review_comment":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/pulls/827/commits"},"statuses":{"href":"https://api.github.com/repos/SkygearIO/skygear-server/statuses/06ff428241fde5e4ef30bfc67cceca32b6033723"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"carmenlau"}}