{"action":"created","comment":{"url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/comments/26471606","id":26471606,"diff_hunk":"@@ -52,8 +56,41 @@ def put(self, path, *args, **kwargs):\n class UserClient(BaseClient):\n     base_path = '/users'\n \n-    def get_user(self, user_id):\n+    def __init__(self, **settings):\n+        super(UserClient, self).__init__(**settings)\n+        self.login_callback_url = settings.get('login_callback_url', None)\n+\n+    def get_app_data(self, user_id):\n         return self.get('%s' % user_id)\n \n-    def save_user(self, user_id, app_data):\n+    def save_app_data(self, user_id, app_data):\n         return self.post('%s' % user_id, data=app_data)\n+\n+    def _get_login_callback_url(self, login_callback_url=None):\n+        login_callback_url = login_callback_url or self.login_callback_url\n+\n+        if not login_callback_url:\n+            raise ValueError('no login_callback_url provided')\n+\n+        # check that url is absolute\n+        parts = urlparse(login_callback_url)\n+        if not (parts.scheme and parts.netloc):\n+            raise ValueError('login_callback_url must be absolute')\n+\n+        return login_callback_url\n+\n+    def get_login_redirect_url(self, login_callback_url=None):\n+        # TODO: enforce https","path":"unicore/hub/client/__init__.py","position":58,"original_position":58,"commit_id":"ffabe28fc33e948a241a87b4260018f76fbfa0bf","original_commit_id":"ffabe28fc33e948a241a87b4260018f76fbfa0bf","user":{"login":"Rizziepit","id":588701,"avatar_url":"https://avatars.githubusercontent.com/u/588701?v=3","gravatar_id":"","url":"https://api.github.com/users/Rizziepit","html_url":"https://github.com/Rizziepit","followers_url":"https://api.github.com/users/Rizziepit/followers","following_url":"https://api.github.com/users/Rizziepit/following{/other_user}","gists_url":"https://api.github.com/users/Rizziepit/gists{/gist_id}","starred_url":"https://api.github.com/users/Rizziepit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rizziepit/subscriptions","organizations_url":"https://api.github.com/users/Rizziepit/orgs","repos_url":"https://api.github.com/users/Rizziepit/repos","events_url":"https://api.github.com/users/Rizziepit/events{/privacy}","received_events_url":"https://api.github.com/users/Rizziepit/received_events","type":"User","site_admin":false},"body":"Yes. Will we install certs for QA as well?","created_at":"2015-03-16T10:01:16Z","updated_at":"2015-03-16T10:01:16Z","html_url":"https://github.com/universalcore/unicore.hub.client/pull/1#discussion_r26471606","pull_request_url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/comments/26471606"},"html":{"href":"https://github.com/universalcore/unicore.hub.client/pull/1#discussion_r26471606"},"pull_request":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1","id":31190208,"html_url":"https://github.com/universalcore/unicore.hub.client/pull/1","diff_url":"https://github.com/universalcore/unicore.hub.client/pull/1.diff","patch_url":"https://github.com/universalcore/unicore.hub.client/pull/1.patch","issue_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/1","number":1,"state":"open","locked":false,"title":"Add support for SSO flow","user":{"login":"Rizziepit","id":588701,"avatar_url":"https://avatars.githubusercontent.com/u/588701?v=3","gravatar_id":"","url":"https://api.github.com/users/Rizziepit","html_url":"https://github.com/Rizziepit","followers_url":"https://api.github.com/users/Rizziepit/followers","following_url":"https://api.github.com/users/Rizziepit/following{/other_user}","gists_url":"https://api.github.com/users/Rizziepit/gists{/gist_id}","starred_url":"https://api.github.com/users/Rizziepit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rizziepit/subscriptions","organizations_url":"https://api.github.com/users/Rizziepit/orgs","repos_url":"https://api.github.com/users/Rizziepit/repos","events_url":"https://api.github.com/users/Rizziepit/events{/privacy}","received_events_url":"https://api.github.com/users/Rizziepit/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-14T21:12:33Z","updated_at":"2015-03-16T10:01:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7ed3f654c92d548d9a8e6f4c79db3be5a4335d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1/commits","review_comments_url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1/comments","review_comment_url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/1/comments","statuses_url":"https://api.github.com/repos/universalcore/unicore.hub.client/statuses/ffabe28fc33e948a241a87b4260018f76fbfa0bf","head":{"label":"universalcore:feature/issue-1-add-support-for-sso-flow","ref":"feature/issue-1-add-support-for-sso-flow","sha":"ffabe28fc33e948a241a87b4260018f76fbfa0bf","user":{"login":"universalcore","id":8818658,"avatar_url":"https://avatars.githubusercontent.com/u/8818658?v=3","gravatar_id":"","url":"https://api.github.com/users/universalcore","html_url":"https://github.com/universalcore","followers_url":"https://api.github.com/users/universalcore/followers","following_url":"https://api.github.com/users/universalcore/following{/other_user}","gists_url":"https://api.github.com/users/universalcore/gists{/gist_id}","starred_url":"https://api.github.com/users/universalcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/universalcore/subscriptions","organizations_url":"https://api.github.com/users/universalcore/orgs","repos_url":"https://api.github.com/users/universalcore/repos","events_url":"https://api.github.com/users/universalcore/events{/privacy}","received_events_url":"https://api.github.com/users/universalcore/received_events","type":"Organization","site_admin":false},"repo":{"id":32139410,"name":"unicore.hub.client","full_name":"universalcore/unicore.hub.client","owner":{"login":"universalcore","id":8818658,"avatar_url":"https://avatars.githubusercontent.com/u/8818658?v=3","gravatar_id":"","url":"https://api.github.com/users/universalcore","html_url":"https://github.com/universalcore","followers_url":"https://api.github.com/users/universalcore/followers","following_url":"https://api.github.com/users/universalcore/following{/other_user}","gists_url":"https://api.github.com/users/universalcore/gists{/gist_id}","starred_url":"https://api.github.com/users/universalcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/universalcore/subscriptions","organizations_url":"https://api.github.com/users/universalcore/orgs","repos_url":"https://api.github.com/users/universalcore/repos","events_url":"https://api.github.com/users/universalcore/events{/privacy}","received_events_url":"https://api.github.com/users/universalcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/universalcore/unicore.hub.client","description":"A client library to interact with the https://github.com/universalcore/unicore.hub service","fork":false,"url":"https://api.github.com/repos/universalcore/unicore.hub.client","forks_url":"https://api.github.com/repos/universalcore/unicore.hub.client/forks","keys_url":"https://api.github.com/repos/universalcore/unicore.hub.client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/universalcore/unicore.hub.client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/universalcore/unicore.hub.client/teams","hooks_url":"https://api.github.com/repos/universalcore/unicore.hub.client/hooks","issue_events_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/events{/number}","events_url":"https://api.github.com/repos/universalcore/unicore.hub.client/events","assignees_url":"https://api.github.com/repos/universalcore/unicore.hub.client/assignees{/user}","branches_url":"https://api.github.com/repos/universalcore/unicore.hub.client/branches{/branch}","tags_url":"https://api.github.com/repos/universalcore/unicore.hub.client/tags","blobs_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/refs{/sha}","trees_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/universalcore/unicore.hub.client/statuses/{sha}","languages_url":"https://api.github.com/repos/universalcore/unicore.hub.client/languages","stargazers_url":"https://api.github.com/repos/universalcore/unicore.hub.client/stargazers","contributors_url":"https://api.github.com/repos/universalcore/unicore.hub.client/contributors","subscribers_url":"https://api.github.com/repos/universalcore/unicore.hub.client/subscribers","subscription_url":"https://api.github.com/repos/universalcore/unicore.hub.client/subscription","commits_url":"https://api.github.com/repos/universalcore/unicore.hub.client/commits{/sha}","git_commits_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/commits{/sha}","comments_url":"https://api.github.com/repos/universalcore/unicore.hub.client/comments{/number}","issue_comment_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/comments{/number}","contents_url":"https://api.github.com/repos/universalcore/unicore.hub.client/contents/{+path}","compare_url":"https://api.github.com/repos/universalcore/unicore.hub.client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/universalcore/unicore.hub.client/merges","archive_url":"https://api.github.com/repos/universalcore/unicore.hub.client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/universalcore/unicore.hub.client/downloads","issues_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues{/number}","pulls_url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls{/number}","milestones_url":"https://api.github.com/repos/universalcore/unicore.hub.client/milestones{/number}","notifications_url":"https://api.github.com/repos/universalcore/unicore.hub.client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/universalcore/unicore.hub.client/labels{/name}","releases_url":"https://api.github.com/repos/universalcore/unicore.hub.client/releases{/id}","created_at":"2015-03-13T07:34:55Z","updated_at":"2015-03-13T12:38:29Z","pushed_at":"2015-03-14T21:12:14Z","git_url":"git://github.com/universalcore/unicore.hub.client.git","ssh_url":"git@github.com:universalcore/unicore.hub.client.git","clone_url":"https://github.com/universalcore/unicore.hub.client.git","svn_url":"https://github.com/universalcore/unicore.hub.client","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"universalcore:develop","ref":"develop","sha":"c7b5c864a193761cc01ac21bf1f18bb8c91c596b","user":{"login":"universalcore","id":8818658,"avatar_url":"https://avatars.githubusercontent.com/u/8818658?v=3","gravatar_id":"","url":"https://api.github.com/users/universalcore","html_url":"https://github.com/universalcore","followers_url":"https://api.github.com/users/universalcore/followers","following_url":"https://api.github.com/users/universalcore/following{/other_user}","gists_url":"https://api.github.com/users/universalcore/gists{/gist_id}","starred_url":"https://api.github.com/users/universalcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/universalcore/subscriptions","organizations_url":"https://api.github.com/users/universalcore/orgs","repos_url":"https://api.github.com/users/universalcore/repos","events_url":"https://api.github.com/users/universalcore/events{/privacy}","received_events_url":"https://api.github.com/users/universalcore/received_events","type":"Organization","site_admin":false},"repo":{"id":32139410,"name":"unicore.hub.client","full_name":"universalcore/unicore.hub.client","owner":{"login":"universalcore","id":8818658,"avatar_url":"https://avatars.githubusercontent.com/u/8818658?v=3","gravatar_id":"","url":"https://api.github.com/users/universalcore","html_url":"https://github.com/universalcore","followers_url":"https://api.github.com/users/universalcore/followers","following_url":"https://api.github.com/users/universalcore/following{/other_user}","gists_url":"https://api.github.com/users/universalcore/gists{/gist_id}","starred_url":"https://api.github.com/users/universalcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/universalcore/subscriptions","organizations_url":"https://api.github.com/users/universalcore/orgs","repos_url":"https://api.github.com/users/universalcore/repos","events_url":"https://api.github.com/users/universalcore/events{/privacy}","received_events_url":"https://api.github.com/users/universalcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/universalcore/unicore.hub.client","description":"A client library to interact with the https://github.com/universalcore/unicore.hub service","fork":false,"url":"https://api.github.com/repos/universalcore/unicore.hub.client","forks_url":"https://api.github.com/repos/universalcore/unicore.hub.client/forks","keys_url":"https://api.github.com/repos/universalcore/unicore.hub.client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/universalcore/unicore.hub.client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/universalcore/unicore.hub.client/teams","hooks_url":"https://api.github.com/repos/universalcore/unicore.hub.client/hooks","issue_events_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/events{/number}","events_url":"https://api.github.com/repos/universalcore/unicore.hub.client/events","assignees_url":"https://api.github.com/repos/universalcore/unicore.hub.client/assignees{/user}","branches_url":"https://api.github.com/repos/universalcore/unicore.hub.client/branches{/branch}","tags_url":"https://api.github.com/repos/universalcore/unicore.hub.client/tags","blobs_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/refs{/sha}","trees_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/universalcore/unicore.hub.client/statuses/{sha}","languages_url":"https://api.github.com/repos/universalcore/unicore.hub.client/languages","stargazers_url":"https://api.github.com/repos/universalcore/unicore.hub.client/stargazers","contributors_url":"https://api.github.com/repos/universalcore/unicore.hub.client/contributors","subscribers_url":"https://api.github.com/repos/universalcore/unicore.hub.client/subscribers","subscription_url":"https://api.github.com/repos/universalcore/unicore.hub.client/subscription","commits_url":"https://api.github.com/repos/universalcore/unicore.hub.client/commits{/sha}","git_commits_url":"https://api.github.com/repos/universalcore/unicore.hub.client/git/commits{/sha}","comments_url":"https://api.github.com/repos/universalcore/unicore.hub.client/comments{/number}","issue_comment_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/comments{/number}","contents_url":"https://api.github.com/repos/universalcore/unicore.hub.client/contents/{+path}","compare_url":"https://api.github.com/repos/universalcore/unicore.hub.client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/universalcore/unicore.hub.client/merges","archive_url":"https://api.github.com/repos/universalcore/unicore.hub.client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/universalcore/unicore.hub.client/downloads","issues_url":"https://api.github.com/repos/universalcore/unicore.hub.client/issues{/number}","pulls_url":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls{/number}","milestones_url":"https://api.github.com/repos/universalcore/unicore.hub.client/milestones{/number}","notifications_url":"https://api.github.com/repos/universalcore/unicore.hub.client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/universalcore/unicore.hub.client/labels{/name}","releases_url":"https://api.github.com/repos/universalcore/unicore.hub.client/releases{/id}","created_at":"2015-03-13T07:34:55Z","updated_at":"2015-03-13T12:38:29Z","pushed_at":"2015-03-14T21:12:14Z","git_url":"git://github.com/universalcore/unicore.hub.client.git","ssh_url":"git@github.com:universalcore/unicore.hub.client.git","clone_url":"https://github.com/universalcore/unicore.hub.client.git","svn_url":"https://github.com/universalcore/unicore.hub.client","homepage":"","size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1"},"html":{"href":"https://github.com/universalcore/unicore.hub.client/pull/1"},"issue":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/1"},"comments":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/universalcore/unicore.hub.client/statuses/ffabe28fc33e948a241a87b4260018f76fbfa0bf"}}}}