{"action":"created","comment":{"url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/comments/238837124","pull_request_review_id":181452574,"id":238837124,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODgzNzEyNA==","diff_hunk":"@@ -443,16 +469,24 @@ def authorization():\n     try:\n         # parsing succeeds if there is an auth header\n         bearer, auth_token = parse_token()\n-    except AssertionError:\n+        app.logger.info('(MK comment) bearer: {}, auth_token: {}'.format(bearer, auth_token))\n+    except AssertionError as e:\n+        app.logger.info('(MK comment) Assertion error: ' + e.message)","path":"app.py","position":85,"original_position":85,"commit_id":"980cb25e13c1f31c0e01531dbf8ef69f194e8eba","original_commit_id":"980cb25e13c1f31c0e01531dbf8ef69f194e8eba","user":{"login":"coverbeck","id":1049340,"node_id":"MDQ6VXNlcjEwNDkzNDA=","avatar_url":"https://avatars3.githubusercontent.com/u/1049340?v=4","gravatar_id":"","url":"https://api.github.com/users/coverbeck","html_url":"https://github.com/coverbeck","followers_url":"https://api.github.com/users/coverbeck/followers","following_url":"https://api.github.com/users/coverbeck/following{/other_user}","gists_url":"https://api.github.com/users/coverbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/coverbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coverbeck/subscriptions","organizations_url":"https://api.github.com/users/coverbeck/orgs","repos_url":"https://api.github.com/users/coverbeck/repos","events_url":"https://api.github.com/users/coverbeck/events{/privacy}","received_events_url":"https://api.github.com/users/coverbeck/received_events","type":"User","site_admin":false},"body":"Should be `.error` instead of `.info`","created_at":"2018-12-04T21:02:57Z","updated_at":"2018-12-04T21:14:13Z","html_url":"https://github.com/DataBiosphere/cgp-dashboard/pull/95#discussion_r238837124","pull_request_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/comments/238837124"},"html":{"href":"https://github.com/DataBiosphere/cgp-dashboard/pull/95#discussion_r238837124"},"pull_request":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95","id":235923254,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1OTIzMjU0","html_url":"https://github.com/DataBiosphere/cgp-dashboard/pull/95","diff_url":"https://github.com/DataBiosphere/cgp-dashboard/pull/95.diff","patch_url":"https://github.com/DataBiosphere/cgp-dashboard/pull/95.patch","issue_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/95","number":95,"state":"open","locked":false,"title":"Use refresh token to refresh access token after 1 h (resolved #91)","user":{"login":"mjkrause","id":15079157,"node_id":"MDQ6VXNlcjE1MDc5MTU3","avatar_url":"https://avatars0.githubusercontent.com/u/15079157?v=4","gravatar_id":"","url":"https://api.github.com/users/mjkrause","html_url":"https://github.com/mjkrause","followers_url":"https://api.github.com/users/mjkrause/followers","following_url":"https://api.github.com/users/mjkrause/following{/other_user}","gists_url":"https://api.github.com/users/mjkrause/gists{/gist_id}","starred_url":"https://api.github.com/users/mjkrause/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjkrause/subscriptions","organizations_url":"https://api.github.com/users/mjkrause/orgs","repos_url":"https://api.github.com/users/mjkrause/repos","events_url":"https://api.github.com/users/mjkrause/events{/privacy}","received_events_url":"https://api.github.com/users/mjkrause/received_events","type":"User","site_admin":false},"body":"The good news is that a user is not prompted to log in again after 1 h anymore. \r\n\r\nYet, I have doubts about the way I've implemented it and would appreciate suggestions. Specifically, `_get_user_info_from_token` returns a 401 if access token isn't provided. That happens once user has been logged in for more than 1 h. I then set both, new refresh and access tokens in the User object instance. I'm not sure though why, following that, `current_user.access_token` doesn't return the refreshed access token?\r\n\r\nThe observation is that once 1 h has passed each new GET request immediately executes line  https://github.com/DataBiosphere/cgp-dashboard/blob/fix/mkrause/91-refresh-auth-token/app.py#L390, indicating that the refreshed access token wasn't set. In other words, I would expect a refreshed access token to be valid again for 60 min before it expires.\r\n\r\nThe code still contains several comments, logged in `dcc-dashboard/logs/error_uwsgiB.log` (after `sudo -i`) which helped me debugging it, and which I plan to remove.\r\n\r\nAn instance is running at https://mkrause1.ucsc-cgp-dev.org. ","created_at":"2018-12-04T19:01:19Z","updated_at":"2018-12-04T21:14:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"mjkrause","id":15079157,"node_id":"MDQ6VXNlcjE1MDc5MTU3","avatar_url":"https://avatars0.githubusercontent.com/u/15079157?v=4","gravatar_id":"","url":"https://api.github.com/users/mjkrause","html_url":"https://github.com/mjkrause","followers_url":"https://api.github.com/users/mjkrause/followers","following_url":"https://api.github.com/users/mjkrause/following{/other_user}","gists_url":"https://api.github.com/users/mjkrause/gists{/gist_id}","starred_url":"https://api.github.com/users/mjkrause/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjkrause/subscriptions","organizations_url":"https://api.github.com/users/mjkrause/orgs","repos_url":"https://api.github.com/users/mjkrause/repos","events_url":"https://api.github.com/users/mjkrause/events{/privacy}","received_events_url":"https://api.github.com/users/mjkrause/received_events","type":"User","site_admin":false},"assignees":[{"login":"mjkrause","id":15079157,"node_id":"MDQ6VXNlcjE1MDc5MTU3","avatar_url":"https://avatars0.githubusercontent.com/u/15079157?v=4","gravatar_id":"","url":"https://api.github.com/users/mjkrause","html_url":"https://github.com/mjkrause","followers_url":"https://api.github.com/users/mjkrause/followers","following_url":"https://api.github.com/users/mjkrause/following{/other_user}","gists_url":"https://api.github.com/users/mjkrause/gists{/gist_id}","starred_url":"https://api.github.com/users/mjkrause/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjkrause/subscriptions","organizations_url":"https://api.github.com/users/mjkrause/orgs","repos_url":"https://api.github.com/users/mjkrause/repos","events_url":"https://api.github.com/users/mjkrause/events{/privacy}","received_events_url":"https://api.github.com/users/mjkrause/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1079809041,"node_id":"MDU6TGFiZWwxMDc5ODA5MDQx","url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/labels/commons","name":"commons","color":"006400","default":false},{"id":719156011,"node_id":"MDU6TGFiZWw3MTkxNTYwMTE=","url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95/commits","review_comments_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95/comments","review_comment_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/95/comments","statuses_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/statuses/980cb25e13c1f31c0e01531dbf8ef69f194e8eba","head":{"label":"DataBiosphere:fix/mkrause/91-refresh-auth-token","ref":"fix/mkrause/91-refresh-auth-token","sha":"980cb25e13c1f31c0e01531dbf8ef69f194e8eba","user":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":72685696,"node_id":"MDEwOlJlcG9zaXRvcnk3MjY4NTY5Ng==","name":"cgp-dashboard","full_name":"DataBiosphere/cgp-dashboard","private":false,"owner":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataBiosphere/cgp-dashboard","description":"The Core's web dashboard including a faceted file browser","fork":false,"url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard","forks_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/forks","keys_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/events","assignees_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/merges","archive_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/deployments","created_at":"2016-11-02T22:10:23Z","updated_at":"2018-12-03T22:14:40Z","pushed_at":"2018-12-04T19:01:20Z","git_url":"git://github.com/DataBiosphere/cgp-dashboard.git","ssh_url":"git@github.com:DataBiosphere/cgp-dashboard.git","clone_url":"https://github.com/DataBiosphere/cgp-dashboard.git","svn_url":"https://github.com/DataBiosphere/cgp-dashboard","homepage":null,"size":3360,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":7,"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":5,"open_issues":7,"watchers":1,"default_branch":"feature/commons"}},"base":{"label":"DataBiosphere:feature/commons","ref":"feature/commons","sha":"11c56b58032326c7dc821d303b2c98eb63abee90","user":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":72685696,"node_id":"MDEwOlJlcG9zaXRvcnk3MjY4NTY5Ng==","name":"cgp-dashboard","full_name":"DataBiosphere/cgp-dashboard","private":false,"owner":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataBiosphere/cgp-dashboard","description":"The Core's web dashboard including a faceted file browser","fork":false,"url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard","forks_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/forks","keys_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/events","assignees_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/merges","archive_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/deployments","created_at":"2016-11-02T22:10:23Z","updated_at":"2018-12-03T22:14:40Z","pushed_at":"2018-12-04T19:01:20Z","git_url":"git://github.com/DataBiosphere/cgp-dashboard.git","ssh_url":"git@github.com:DataBiosphere/cgp-dashboard.git","clone_url":"https://github.com/DataBiosphere/cgp-dashboard.git","svn_url":"https://github.com/DataBiosphere/cgp-dashboard","homepage":null,"size":3360,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":7,"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":5,"open_issues":7,"watchers":1,"default_branch":"feature/commons"}},"_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95"},"html":{"href":"https://github.com/DataBiosphere/cgp-dashboard/pull/95"},"issue":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/95"},"comments":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95/comments"},"review_comment":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/pulls/95/commits"},"statuses":{"href":"https://api.github.com/repos/DataBiosphere/cgp-dashboard/statuses/980cb25e13c1f31c0e01531dbf8ef69f194e8eba"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"coverbeck"}}