{"action":"created","comment":{"url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/comments/24671340","id":24671340,"diff_hunk":"@@ -301,73 +385,78 @@\n }\n \n function onIdentityChanged(select) {\n-  var jsid = document.getElementById(\"ident_options\").value;\n-  _logData('Identity selected with jsid: ' + jsid);\n-  var identobj = tizen.sso.authService.getIdentityByJSId(jsid);\n-  if (identobj == null) {\n+  var guiId = document.getElementById(\"ident_options\").value;\n+  _logData('Identity selected with guiId: ' + guiId);\n+  var appIdent = _getAppIdentityByGuiId(guiId);\n+  if (appIdent == null) {\n     _logData('identity NOT found');\n     return;\n   }\n   clearSelect(document.getElementById(\"sess_options\"));\n-  for (var i = 0; i < identobj.sessions.length; i++) {\n+  for (var i = 0; i < appIdent.sessions.length; i++) {\n     var option = document.createElement('option');\n-    option.text = option.value = identobj.sessions[i].jsid;\n+    option.text = option.value = appIdent.sessions[i].guiId;\n     document.getElementById('sess_options').add(option, 0);\n   }\n }\n \n //identity interface\n-function startSession() {\n-  var identobj = tizen.sso.authService.getIdentityByJSId(\n-    document.getElementById('ident_options').value);\n-  if (identobj == null) {\n+function getSession() {\n+  var appIdent = _getAppIdentityByGuiId(document.getElementById('ident_options').value);\n+  if (appIdent == null) {\n     _logData('identity NOT selected/found. Please select/create an identity first');\n     return;\n   }\n-  _logData('identity found with JSId: ' + identobj.jsid);\n+  _logData('identity for getSession: ' + appIdent.guiId);\n   var method = document.getElementById('ident_method').value;\n   \n-  var res = identobj.startSession(method);\n+  var res = appIdent.identityObject.getSession(method);\n   if (res != null) {\n-    res.then(onStartSessionComplete,\n-      function(err) {_logData('startSession failed: ' + err);});\n+    res.then(onGetSessionComplete,\n+      function(err) {_logData('getSession failed: ' + err);});\n   } else {\n-    _logData('Session cannot be started');\n+    _logData('Session cannot be retrieved');\n   }\n }\n \n-function onStartSessionComplete(sessionobj) {\n-  _logData('startSession successful: ' + JSON.stringify(sessionobj));\n+function onGetSessionComplete(sessionobj) {\n+  _logData('getSession successful: ' + JSON.stringify(sessionobj));\n   sessionobj.addEventListener('statechanged', onSessionStateChanged);\n-\n-  _logData('Session with jsid as ' + sessionobj.jsid + ' is added for identity with jsid '\n-     + sessionobj.identityJSId);\n   var select = document.getElementById(\"ident_options\");\n-  if (select.value == sessionobj.identityJSId) {\n+  var appIdentity = _getAppIdentityByGuiId(select.value);\n+  if (appIdentity != null) {\n+    var appSession = new AppSession(sessionobj);\n+    appIdentity.sessions.push(appSession);\n     var sess_select = document.getElementById(\"sess_options\");\n     var option = document.createElement('option');\n-    option.text = option.value = sessionobj.jsid;\n+    option.text = option.value = appSession.guiId;\n     sess_select.add(option, 0);\n+    document.getElementById('sess_options').value = appSession.guiId; \n   }\n }\n \n function onSessionStateChanged(event) {\n   var sessionobj = event.session;\n-  _logData('Session with jsid ' + sessionobj.jsid + ' state has changed to '\n-    + sessionobj.sessionState);\n+  var appSession = _getAppSession(sessionobj);\n+  if (appSession != null) {\n+    _logData('Session state has changed to ' + sessionobj.sessionState +\n+        ' for session with guiId ' + appSession.guiId);","path":"examples/sso-advanced.html","position":287,"original_position":287,"commit_id":"66982c89568c6ddce8bdede3ca0ae2344cb27355","original_commit_id":"66982c89568c6ddce8bdede3ca0ae2344cb27355","user":{"login":"halton","id":433218,"avatar_url":"https://avatars.githubusercontent.com/u/433218?v=3","gravatar_id":"","url":"https://api.github.com/users/halton","html_url":"https://github.com/halton","followers_url":"https://api.github.com/users/halton/followers","following_url":"https://api.github.com/users/halton/following{/other_user}","gists_url":"https://api.github.com/users/halton/gists{/gist_id}","starred_url":"https://api.github.com/users/halton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halton/subscriptions","organizations_url":"https://api.github.com/users/halton/orgs","repos_url":"https://api.github.com/users/halton/repos","events_url":"https://api.github.com/users/halton/events{/privacy}","received_events_url":"https://api.github.com/users/halton/received_events","type":"User","site_admin":false},"body":"nit, align with string\r\n```\r\n_logData('Session state has changed to ' + sessionobj.sessionState +\r\n         ' for session with guiId ' + appSession.guiId);\r\n```","created_at":"2015-02-13T15:32:51Z","updated_at":"2015-02-13T15:32:51Z","html_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk/pull/449#discussion_r24671340","pull_request_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449","_links":{"self":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/comments/24671340"},"html":{"href":"https://github.com/crosswalk-project/tizen-extensions-crosswalk/pull/449#discussion_r24671340"},"pull_request":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449"}}},"pull_request":{"url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449","id":29105866,"html_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk/pull/449","diff_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk/pull/449.diff","patch_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk/pull/449.patch","issue_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues/449","number":449,"state":"open","locked":false,"title":"SSO: Fix SSO Web APIs as per widl specifications","user":{"login":"izaman","id":996417,"avatar_url":"https://avatars.githubusercontent.com/u/996417?v=3","gravatar_id":"","url":"https://api.github.com/users/izaman","html_url":"https://github.com/izaman","followers_url":"https://api.github.com/users/izaman/followers","following_url":"https://api.github.com/users/izaman/following{/other_user}","gists_url":"https://api.github.com/users/izaman/gists{/gist_id}","starred_url":"https://api.github.com/users/izaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izaman/subscriptions","organizations_url":"https://api.github.com/users/izaman/orgs","repos_url":"https://api.github.com/users/izaman/repos","events_url":"https://api.github.com/users/izaman/events{/privacy}","received_events_url":"https://api.github.com/users/izaman/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-11T16:34:31Z","updated_at":"2015-02-13T15:32:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"141240c03be3bc827c65149dfab6144d341d9893","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449/commits","review_comments_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449/comments","review_comment_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/comments/{number}","comments_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues/449/comments","statuses_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/statuses/66982c89568c6ddce8bdede3ca0ae2344cb27355","head":{"label":"izaman:master","ref":"master","sha":"66982c89568c6ddce8bdede3ca0ae2344cb27355","user":{"login":"izaman","id":996417,"avatar_url":"https://avatars.githubusercontent.com/u/996417?v=3","gravatar_id":"","url":"https://api.github.com/users/izaman","html_url":"https://github.com/izaman","followers_url":"https://api.github.com/users/izaman/followers","following_url":"https://api.github.com/users/izaman/following{/other_user}","gists_url":"https://api.github.com/users/izaman/gists{/gist_id}","starred_url":"https://api.github.com/users/izaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izaman/subscriptions","organizations_url":"https://api.github.com/users/izaman/orgs","repos_url":"https://api.github.com/users/izaman/repos","events_url":"https://api.github.com/users/izaman/events{/privacy}","received_events_url":"https://api.github.com/users/izaman/received_events","type":"User","site_admin":false},"repo":{"id":21122445,"name":"tizen-extensions-crosswalk","full_name":"izaman/tizen-extensions-crosswalk","owner":{"login":"izaman","id":996417,"avatar_url":"https://avatars.githubusercontent.com/u/996417?v=3","gravatar_id":"","url":"https://api.github.com/users/izaman","html_url":"https://github.com/izaman","followers_url":"https://api.github.com/users/izaman/followers","following_url":"https://api.github.com/users/izaman/following{/other_user}","gists_url":"https://api.github.com/users/izaman/gists{/gist_id}","starred_url":"https://api.github.com/users/izaman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/izaman/subscriptions","organizations_url":"https://api.github.com/users/izaman/orgs","repos_url":"https://api.github.com/users/izaman/repos","events_url":"https://api.github.com/users/izaman/events{/privacy}","received_events_url":"https://api.github.com/users/izaman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/izaman/tizen-extensions-crosswalk","description":"","fork":true,"url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk","forks_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/forks","keys_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/teams","hooks_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/hooks","issue_events_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/issues/events{/number}","events_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/events","assignees_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/assignees{/user}","branches_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/branches{/branch}","tags_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/tags","blobs_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/git/refs{/sha}","trees_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/statuses/{sha}","languages_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/languages","stargazers_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/stargazers","contributors_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/contributors","subscribers_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/subscribers","subscription_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/subscription","commits_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/commits{/sha}","git_commits_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/git/commits{/sha}","comments_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/comments{/number}","issue_comment_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/issues/comments/{number}","contents_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/contents/{+path}","compare_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/merges","archive_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/downloads","issues_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/issues{/number}","pulls_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/pulls{/number}","milestones_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/milestones{/number}","notifications_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/labels{/name}","releases_url":"https://api.github.com/repos/izaman/tizen-extensions-crosswalk/releases{/id}","created_at":"2014-06-23T10:33:06Z","updated_at":"2015-02-12T12:32:31Z","pushed_at":"2015-02-12T12:32:31Z","git_url":"git://github.com/izaman/tizen-extensions-crosswalk.git","ssh_url":"git@github.com:izaman/tizen-extensions-crosswalk.git","clone_url":"https://github.com/izaman/tizen-extensions-crosswalk.git","svn_url":"https://github.com/izaman/tizen-extensions-crosswalk","homepage":null,"size":2812,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crosswalk-project:master","ref":"master","sha":"5957945effafff02a507c35a4b7b4d5ee6ca14c1","user":{"login":"crosswalk-project","id":4867377,"avatar_url":"https://avatars.githubusercontent.com/u/4867377?v=3","gravatar_id":"","url":"https://api.github.com/users/crosswalk-project","html_url":"https://github.com/crosswalk-project","followers_url":"https://api.github.com/users/crosswalk-project/followers","following_url":"https://api.github.com/users/crosswalk-project/following{/other_user}","gists_url":"https://api.github.com/users/crosswalk-project/gists{/gist_id}","starred_url":"https://api.github.com/users/crosswalk-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosswalk-project/subscriptions","organizations_url":"https://api.github.com/users/crosswalk-project/orgs","repos_url":"https://api.github.com/users/crosswalk-project/repos","events_url":"https://api.github.com/users/crosswalk-project/events{/privacy}","received_events_url":"https://api.github.com/users/crosswalk-project/received_events","type":"Organization","site_admin":false},"repo":{"id":11259856,"name":"tizen-extensions-crosswalk","full_name":"crosswalk-project/tizen-extensions-crosswalk","owner":{"login":"crosswalk-project","id":4867377,"avatar_url":"https://avatars.githubusercontent.com/u/4867377?v=3","gravatar_id":"","url":"https://api.github.com/users/crosswalk-project","html_url":"https://github.com/crosswalk-project","followers_url":"https://api.github.com/users/crosswalk-project/followers","following_url":"https://api.github.com/users/crosswalk-project/following{/other_user}","gists_url":"https://api.github.com/users/crosswalk-project/gists{/gist_id}","starred_url":"https://api.github.com/users/crosswalk-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crosswalk-project/subscriptions","organizations_url":"https://api.github.com/users/crosswalk-project/orgs","repos_url":"https://api.github.com/users/crosswalk-project/repos","events_url":"https://api.github.com/users/crosswalk-project/events{/privacy}","received_events_url":"https://api.github.com/users/crosswalk-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk","description":"","fork":false,"url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk","forks_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/forks","keys_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/teams","hooks_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/hooks","issue_events_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues/events{/number}","events_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/events","assignees_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/assignees{/user}","branches_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/branches{/branch}","tags_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/tags","blobs_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/git/refs{/sha}","trees_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/statuses/{sha}","languages_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/languages","stargazers_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/stargazers","contributors_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/contributors","subscribers_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/subscribers","subscription_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/subscription","commits_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/commits{/sha}","git_commits_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/git/commits{/sha}","comments_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/comments{/number}","issue_comment_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues/comments/{number}","contents_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/contents/{+path}","compare_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/merges","archive_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/downloads","issues_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues{/number}","pulls_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls{/number}","milestones_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/milestones{/number}","notifications_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/labels{/name}","releases_url":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/releases{/id}","created_at":"2013-07-08T16:54:26Z","updated_at":"2015-02-13T15:22:45Z","pushed_at":"2015-02-13T15:22:45Z","git_url":"git://github.com/crosswalk-project/tizen-extensions-crosswalk.git","ssh_url":"git@github.com:crosswalk-project/tizen-extensions-crosswalk.git","clone_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk.git","svn_url":"https://github.com/crosswalk-project/tizen-extensions-crosswalk","homepage":null,"size":6271,"stargazers_count":17,"watchers_count":17,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":1,"forks":69,"open_issues":1,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449"},"html":{"href":"https://github.com/crosswalk-project/tizen-extensions-crosswalk/pull/449"},"issue":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues/449"},"comments":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/issues/449/comments"},"review_comments":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449/comments"},"review_comment":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/pulls/449/commits"},"statuses":{"href":"https://api.github.com/repos/crosswalk-project/tizen-extensions-crosswalk/statuses/66982c89568c6ddce8bdede3ca0ae2344cb27355"}}}}