{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter/jupyterhub/pulls/comments/29550323","id":29550323,"diff_hunk":"@@ -17,9 +17,7 @@ def get(self, token):\n         orm_token = orm.APIToken.find(self.db, token)\n         if orm_token is None:\n             raise web.HTTPError(404)\n-        self.write(json.dumps({\n-            'user' : orm_token.user.name,\n-        }))\n+        self.write(json.dumps(self.user_model(orm_token.user)))","path":"jupyterhub/apihandlers/auth.py","position":7,"original_position":7,"commit_id":"80997c829700ba2bb8f9979b2c12d8bac350ad19","original_commit_id":"80997c829700ba2bb8f9979b2c12d8bac350ad19","user":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"body":"Can you share the error message? Probably a simple fix.","created_at":"2015-05-02T20:16:03Z","updated_at":"2015-05-02T20:16:03Z","html_url":"https://github.com/jupyter/jupyterhub/pull/209#discussion_r29550323","pull_request_url":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209","_links":{"self":{"href":"https://api.github.com/repos/jupyter/jupyterhub/pulls/comments/29550323"},"html":{"href":"https://github.com/jupyter/jupyterhub/pull/209#discussion_r29550323"},"pull_request":{"href":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209","id":31784537,"html_url":"https://github.com/jupyter/jupyterhub/pull/209","diff_url":"https://github.com/jupyter/jupyterhub/pull/209.diff","patch_url":"https://github.com/jupyter/jupyterhub/pull/209.patch","issue_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/209","number":209,"state":"closed","locked":false,"title":"reply with full user model in auth handlers","user":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"body":"Mainly this adds the `admin` key,\nbut I don't see a reason to respond with different subsets of the user model in different circumstances.\n\nbased on #207","created_at":"2015-03-23T23:31:06Z","updated_at":"2015-05-02T20:16:03Z","closed_at":"2015-05-02T01:32:21Z","merged_at":"2015-05-02T01:32:21Z","merge_commit_sha":"c1472654071334d0a0ace2da47e21ef4dabb1736","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209/commits","review_comments_url":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209/comments","review_comment_url":"https://api.github.com/repos/jupyter/jupyterhub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/209/comments","statuses_url":"https://api.github.com/repos/jupyter/jupyterhub/statuses/80997c829700ba2bb8f9979b2c12d8bac350ad19","head":{"label":"minrk:user-model","ref":"user-model","sha":"80997c829700ba2bb8f9979b2c12d8bac350ad19","user":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"repo":{"id":21696764,"name":"jupyterhub","full_name":"minrk/jupyterhub","owner":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/minrk/jupyterhub","description":"Multi-user server for Jupyter notebooks","fork":true,"url":"https://api.github.com/repos/minrk/jupyterhub","forks_url":"https://api.github.com/repos/minrk/jupyterhub/forks","keys_url":"https://api.github.com/repos/minrk/jupyterhub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minrk/jupyterhub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minrk/jupyterhub/teams","hooks_url":"https://api.github.com/repos/minrk/jupyterhub/hooks","issue_events_url":"https://api.github.com/repos/minrk/jupyterhub/issues/events{/number}","events_url":"https://api.github.com/repos/minrk/jupyterhub/events","assignees_url":"https://api.github.com/repos/minrk/jupyterhub/assignees{/user}","branches_url":"https://api.github.com/repos/minrk/jupyterhub/branches{/branch}","tags_url":"https://api.github.com/repos/minrk/jupyterhub/tags","blobs_url":"https://api.github.com/repos/minrk/jupyterhub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minrk/jupyterhub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minrk/jupyterhub/git/refs{/sha}","trees_url":"https://api.github.com/repos/minrk/jupyterhub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minrk/jupyterhub/statuses/{sha}","languages_url":"https://api.github.com/repos/minrk/jupyterhub/languages","stargazers_url":"https://api.github.com/repos/minrk/jupyterhub/stargazers","contributors_url":"https://api.github.com/repos/minrk/jupyterhub/contributors","subscribers_url":"https://api.github.com/repos/minrk/jupyterhub/subscribers","subscription_url":"https://api.github.com/repos/minrk/jupyterhub/subscription","commits_url":"https://api.github.com/repos/minrk/jupyterhub/commits{/sha}","git_commits_url":"https://api.github.com/repos/minrk/jupyterhub/git/commits{/sha}","comments_url":"https://api.github.com/repos/minrk/jupyterhub/comments{/number}","issue_comment_url":"https://api.github.com/repos/minrk/jupyterhub/issues/comments{/number}","contents_url":"https://api.github.com/repos/minrk/jupyterhub/contents/{+path}","compare_url":"https://api.github.com/repos/minrk/jupyterhub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minrk/jupyterhub/merges","archive_url":"https://api.github.com/repos/minrk/jupyterhub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minrk/jupyterhub/downloads","issues_url":"https://api.github.com/repos/minrk/jupyterhub/issues{/number}","pulls_url":"https://api.github.com/repos/minrk/jupyterhub/pulls{/number}","milestones_url":"https://api.github.com/repos/minrk/jupyterhub/milestones{/number}","notifications_url":"https://api.github.com/repos/minrk/jupyterhub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minrk/jupyterhub/labels{/name}","releases_url":"https://api.github.com/repos/minrk/jupyterhub/releases{/id}","created_at":"2014-07-10T14:17:50Z","updated_at":"2015-05-02T16:33:55Z","pushed_at":"2015-05-02T16:33:55Z","git_url":"git://github.com/minrk/jupyterhub.git","ssh_url":"git@github.com:minrk/jupyterhub.git","clone_url":"https://github.com/minrk/jupyterhub.git","svn_url":"https://github.com/minrk/jupyterhub","homepage":"","size":1333,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"jupyter:master","ref":"master","sha":"3fd80f9f3a87f000171b91b78a5ed4da015b86af","user":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"repo":{"id":20785986,"name":"jupyterhub","full_name":"jupyter/jupyterhub","owner":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter/jupyterhub","description":"Multi-user server for Jupyter notebooks","fork":false,"url":"https://api.github.com/repos/jupyter/jupyterhub","forks_url":"https://api.github.com/repos/jupyter/jupyterhub/forks","keys_url":"https://api.github.com/repos/jupyter/jupyterhub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter/jupyterhub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter/jupyterhub/teams","hooks_url":"https://api.github.com/repos/jupyter/jupyterhub/hooks","issue_events_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter/jupyterhub/events","assignees_url":"https://api.github.com/repos/jupyter/jupyterhub/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter/jupyterhub/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter/jupyterhub/tags","blobs_url":"https://api.github.com/repos/jupyter/jupyterhub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter/jupyterhub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter/jupyterhub/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter/jupyterhub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter/jupyterhub/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter/jupyterhub/languages","stargazers_url":"https://api.github.com/repos/jupyter/jupyterhub/stargazers","contributors_url":"https://api.github.com/repos/jupyter/jupyterhub/contributors","subscribers_url":"https://api.github.com/repos/jupyter/jupyterhub/subscribers","subscription_url":"https://api.github.com/repos/jupyter/jupyterhub/subscription","commits_url":"https://api.github.com/repos/jupyter/jupyterhub/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter/jupyterhub/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter/jupyterhub/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter/jupyterhub/issues/comments{/number}","contents_url":"https://api.github.com/repos/jupyter/jupyterhub/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter/jupyterhub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter/jupyterhub/merges","archive_url":"https://api.github.com/repos/jupyter/jupyterhub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter/jupyterhub/downloads","issues_url":"https://api.github.com/repos/jupyter/jupyterhub/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter/jupyterhub/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter/jupyterhub/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter/jupyterhub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter/jupyterhub/labels{/name}","releases_url":"https://api.github.com/repos/jupyter/jupyterhub/releases{/id}","created_at":"2014-06-12T23:22:10Z","updated_at":"2015-05-02T12:24:58Z","pushed_at":"2015-05-02T01:32:22Z","git_url":"git://github.com/jupyter/jupyterhub.git","ssh_url":"git@github.com:jupyter/jupyterhub.git","clone_url":"https://github.com/jupyter/jupyterhub.git","svn_url":"https://github.com/jupyter/jupyterhub","homepage":"","size":2935,"stargazers_count":404,"watchers_count":404,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":19,"forks":55,"open_issues":19,"watchers":404,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209"},"html":{"href":"https://github.com/jupyter/jupyterhub/pull/209"},"issue":{"href":"https://api.github.com/repos/jupyter/jupyterhub/issues/209"},"comments":{"href":"https://api.github.com/repos/jupyter/jupyterhub/issues/209/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter/jupyterhub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jupyter/jupyterhub/pulls/209/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter/jupyterhub/statuses/80997c829700ba2bb8f9979b2c12d8bac350ad19"}}}}