{"action":"created","comment":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/comments/31416625","id":31416625,"diff_hunk":"@@ -47,6 +48,37 @@ def self.load composite_url\n     end\n   end\n \n+  def create_id_site_url(options = {})\n+    base = \"https://\" + DEFAULT_SERVER_HOST + \"/sso\"","path":"lib/stormpath-sdk/resource/application.rb","position":null,"original_position":22,"commit_id":"859dee113cb86cf5279c825b753a80044015b111","original_commit_id":"0ba7727ac4166c59f03cc826142c307590e59cdb","user":{"login":"nikone","id":3949031,"avatar_url":"https://avatars.githubusercontent.com/u/3949031?v=3","gravatar_id":"","url":"https://api.github.com/users/nikone","html_url":"https://github.com/nikone","followers_url":"https://api.github.com/users/nikone/followers","following_url":"https://api.github.com/users/nikone/following{/other_user}","gists_url":"https://api.github.com/users/nikone/gists{/gist_id}","starred_url":"https://api.github.com/users/nikone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikone/subscriptions","organizations_url":"https://api.github.com/users/nikone/orgs","repos_url":"https://api.github.com/users/nikone/repos","events_url":"https://api.github.com/users/nikone/events{/privacy}","received_events_url":"https://api.github.com/users/nikone/received_events","type":"User","site_admin":false},"body":"also changed","created_at":"2015-06-01T11:15:19Z","updated_at":"2015-06-01T11:15:19Z","html_url":"https://github.com/stormpath/stormpath-sdk-ruby/pull/72#discussion_r31416625","pull_request_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/comments/31416625"},"html":{"href":"https://github.com/stormpath/stormpath-sdk-ruby/pull/72#discussion_r31416625"},"pull_request":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72","id":35611213,"html_url":"https://github.com/stormpath/stormpath-sdk-ruby/pull/72","diff_url":"https://github.com/stormpath/stormpath-sdk-ruby/pull/72.diff","patch_url":"https://github.com/stormpath/stormpath-sdk-ruby/pull/72.patch","issue_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues/72","number":72,"state":"open","locked":false,"title":"Id site","user":{"login":"nikone","id":3949031,"avatar_url":"https://avatars.githubusercontent.com/u/3949031?v=3","gravatar_id":"","url":"https://api.github.com/users/nikone","html_url":"https://github.com/nikone","followers_url":"https://api.github.com/users/nikone/followers","following_url":"https://api.github.com/users/nikone/following{/other_user}","gists_url":"https://api.github.com/users/nikone/gists{/gist_id}","starred_url":"https://api.github.com/users/nikone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikone/subscriptions","organizations_url":"https://api.github.com/users/nikone/orgs","repos_url":"https://api.github.com/users/nikone/repos","events_url":"https://api.github.com/users/nikone/events{/privacy}","received_events_url":"https://api.github.com/users/nikone/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nI’ve implemented the ID Site feature http://docs.stormpath.com/guides/using-id-site/\r\n\r\nTwo methods where added to the application class, create_id_site_url and and handle_id_site_callback which handle the creation of url with JWT token required for ID Site and callback request which is returned. If everything went ok the IdSiteResult object is returned which contains sub, status, state and isNewSub information. From the documentation http://docs.stormpath.com/guides/using-id-site/#handling-the-callback-to-your-application-from-id-site and other libraries my assumption was that these four fields are sufficient data on return.  The SDK API functions similar to Python sdk. I tested it with my sinatra app with storm path implementation and everything works fine.\r\n\r\nurl = application.create_id_site_url callback_uri: \"http://darksidecentral.com/id-site-sso\"\r\nurl = application.create_id_site_url( callback_uri: “http://darksidecentral.com/id-site-callback\", logout: true )\r\n\r\nresult = application.handle_id_site_callback url_response\r\n\r\nRegarding the failing tests. They fail because of the encryption keys http://docs.travis-ci.com/user/encryption-keys/ Also more info can be found here http://docs.travis-ci.com/user/pull-requests/#Security-Restrictions-when-testing-Pull-Requests  \"Please note that encrypted environment variables are not available for pull requests from forks.” When runned localy the tests are passing.\r\n\r\nPlease let me know if you have any suggestions or if something else needs to be added to the implementation. \r\n\r\nRegards,\r\nNenad\r\n","created_at":"2015-05-18T08:19:15Z","updated_at":"2015-06-01T11:15:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"745cec522cf39593b0a5c50bf7f4dd2429fedd74","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72/commits","review_comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72/comments","review_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues/72/comments","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/statuses/859dee113cb86cf5279c825b753a80044015b111","head":{"label":"nikone:id_site","ref":"id_site","sha":"859dee113cb86cf5279c825b753a80044015b111","user":{"login":"nikone","id":3949031,"avatar_url":"https://avatars.githubusercontent.com/u/3949031?v=3","gravatar_id":"","url":"https://api.github.com/users/nikone","html_url":"https://github.com/nikone","followers_url":"https://api.github.com/users/nikone/followers","following_url":"https://api.github.com/users/nikone/following{/other_user}","gists_url":"https://api.github.com/users/nikone/gists{/gist_id}","starred_url":"https://api.github.com/users/nikone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikone/subscriptions","organizations_url":"https://api.github.com/users/nikone/orgs","repos_url":"https://api.github.com/users/nikone/repos","events_url":"https://api.github.com/users/nikone/events{/privacy}","received_events_url":"https://api.github.com/users/nikone/received_events","type":"User","site_admin":false},"repo":{"id":35484641,"name":"stormpath-sdk-ruby","full_name":"nikone/stormpath-sdk-ruby","owner":{"login":"nikone","id":3949031,"avatar_url":"https://avatars.githubusercontent.com/u/3949031?v=3","gravatar_id":"","url":"https://api.github.com/users/nikone","html_url":"https://github.com/nikone","followers_url":"https://api.github.com/users/nikone/followers","following_url":"https://api.github.com/users/nikone/following{/other_user}","gists_url":"https://api.github.com/users/nikone/gists{/gist_id}","starred_url":"https://api.github.com/users/nikone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikone/subscriptions","organizations_url":"https://api.github.com/users/nikone/orgs","repos_url":"https://api.github.com/users/nikone/repos","events_url":"https://api.github.com/users/nikone/events{/privacy}","received_events_url":"https://api.github.com/users/nikone/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nikone/stormpath-sdk-ruby","description":"Ruby SDK for the Stormpath User Management and Authentication REST+JSON API","fork":true,"url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby","forks_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/forks","keys_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/teams","hooks_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/hooks","issue_events_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/events","assignees_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/tags","blobs_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/languages","stargazers_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/stargazers","contributors_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/contributors","subscribers_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/subscribers","subscription_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/subscription","commits_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/merges","archive_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/downloads","issues_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/labels{/name}","releases_url":"https://api.github.com/repos/nikone/stormpath-sdk-ruby/releases{/id}","created_at":"2015-05-12T11:41:53Z","updated_at":"2015-05-12T11:41:53Z","pushed_at":"2015-06-01T11:13:50Z","git_url":"git://github.com/nikone/stormpath-sdk-ruby.git","ssh_url":"git@github.com:nikone/stormpath-sdk-ruby.git","clone_url":"https://github.com/nikone/stormpath-sdk-ruby.git","svn_url":"https://github.com/nikone/stormpath-sdk-ruby","homepage":"","size":674,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"stormpath:development","ref":"development","sha":"6d0031ee440439327dce38ff74f25859364e7841","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":4866246,"name":"stormpath-sdk-ruby","full_name":"stormpath/stormpath-sdk-ruby","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-ruby","description":"Ruby SDK for the Stormpath User Management and Authentication REST+JSON API","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby","forks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/releases{/id}","created_at":"2012-07-02T23:56:08Z","updated_at":"2015-02-24T22:22:13Z","pushed_at":"2015-06-01T11:13:50Z","git_url":"git://github.com/stormpath/stormpath-sdk-ruby.git","ssh_url":"git@github.com:stormpath/stormpath-sdk-ruby.git","clone_url":"https://github.com/stormpath/stormpath-sdk-ruby.git","svn_url":"https://github.com/stormpath/stormpath-sdk-ruby","homepage":"","size":1350,"stargazers_count":16,"watchers_count":16,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":20,"forks":7,"open_issues":20,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72"},"html":{"href":"https://github.com/stormpath/stormpath-sdk-ruby/pull/72"},"issue":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues/72"},"comments":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-ruby/statuses/859dee113cb86cf5279c825b753a80044015b111"}}}}