{"action":"created","comment":{"url":"https://api.github.com/repos/draios/sysdig/pulls/comments/93718410","pull_request_review_id":14252213,"id":93718410,"diff_hunk":"@@ -0,0 +1,58 @@\n+/*\n+Copyright (C) 2013-2016 Draios inc.\n+\n+This file is part of sysdig.\n+\n+sysdig is free software; you can redistribute it and/or modify\n+it under the terms of the GNU General Public License version 2 as\n+published by the Free Software Foundation.\n+\n+sysdig is distributed in the hope that it will be useful,\n+but WITHOUT ANY WARRANTY; without even the implied warranty of\n+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+GNU General Public License for more details.\n+\n+You should have received a copy of the GNU General Public License\n+along with sysdig.  If not, see <http://www.gnu.org/licenses/>.\n+*/\n+\n+//\n+// mesos_auth.h\n+//\n+\n+#pragma once\n+\n+#include \"json/json.h\"\n+#include \"mesos_http.h\"\n+#include \"uri.h\"\n+\n+static const uint64_t DCOS_ENTERPRISE_TOKEN_REFRESH_S = 60*60*24; // 1 day\n+\n+class mesos_auth\n+{\n+public:\n+\tmesos_auth(const uri::credentials_t& dcos_enterprise_credentials = uri::credentials_t(),\n+\t\t   int token_refresh_interval = DCOS_ENTERPRISE_TOKEN_REFRESH_S);\n+\t~mesos_auth();\n+\n+\tvoid set_auth_hostname(string &hostname);\n+\n+\tvoid refresh_token();","path":"userspace/libsinsp/mesos_auth.h","position":40,"original_position":40,"commit_id":"303df4ae3b8989a6ce785880ccab456909c63d19","original_commit_id":"822ebb047f1605c2463bb20074bbbb611cd9ebe8","user":{"login":"mstemm","id":13422831,"avatar_url":"https://avatars.githubusercontent.com/u/13422831?v=3","gravatar_id":"","url":"https://api.github.com/users/mstemm","html_url":"https://github.com/mstemm","followers_url":"https://api.github.com/users/mstemm/followers","following_url":"https://api.github.com/users/mstemm/following{/other_user}","gists_url":"https://api.github.com/users/mstemm/gists{/gist_id}","starred_url":"https://api.github.com/users/mstemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstemm/subscriptions","organizations_url":"https://api.github.com/users/mstemm/orgs","repos_url":"https://api.github.com/users/mstemm/repos","events_url":"https://api.github.com/users/mstemm/events{/privacy}","received_events_url":"https://api.github.com/users/mstemm/received_events","type":"User","site_admin":false},"body":"thanks, done.","created_at":"2016-12-23T00:27:44Z","updated_at":"2016-12-23T00:27:44Z","html_url":"https://github.com/draios/sysdig/pull/701#discussion_r93718410","pull_request_url":"https://api.github.com/repos/draios/sysdig/pulls/701","_links":{"self":{"href":"https://api.github.com/repos/draios/sysdig/pulls/comments/93718410"},"html":{"href":"https://github.com/draios/sysdig/pull/701#discussion_r93718410"},"pull_request":{"href":"https://api.github.com/repos/draios/sysdig/pulls/701"}}},"pull_request":{"url":"https://api.github.com/repos/draios/sysdig/pulls/701","id":98868895,"html_url":"https://github.com/draios/sysdig/pull/701","diff_url":"https://github.com/draios/sysdig/pull/701.diff","patch_url":"https://github.com/draios/sysdig/pull/701.patch","issue_url":"https://api.github.com/repos/draios/sysdig/issues/701","number":701,"state":"open","locked":false,"title":"Expose mesos token","user":{"login":"mstemm","id":13422831,"avatar_url":"https://avatars.githubusercontent.com/u/13422831?v=3","gravatar_id":"","url":"https://api.github.com/users/mstemm","html_url":"https://github.com/mstemm","followers_url":"https://api.github.com/users/mstemm/followers","following_url":"https://api.github.com/users/mstemm/following{/other_user}","gists_url":"https://api.github.com/users/mstemm/gists{/gist_id}","starred_url":"https://api.github.com/users/mstemm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstemm/subscriptions","organizations_url":"https://api.github.com/users/mstemm/orgs","repos_url":"https://api.github.com/users/mstemm/repos","events_url":"https://api.github.com/users/mstemm/events{/privacy}","received_events_url":"https://api.github.com/users/mstemm/received_events","type":"User","site_admin":false},"body":"Changes to split mesos authentication into its own class so it can be used without doing any of the other mesos fetching.\r\n\r\n@luca3m I think this is ready for review now. @bertocci if you'd like to take a look any feedback would be welcome too.","created_at":"2016-12-21T04:08:55Z","updated_at":"2016-12-23T00:27:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf3ef56468fa265c871137b9bbd9efa2ce89f5d7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/draios/sysdig/pulls/701/commits","review_comments_url":"https://api.github.com/repos/draios/sysdig/pulls/701/comments","review_comment_url":"https://api.github.com/repos/draios/sysdig/pulls/comments{/number}","comments_url":"https://api.github.com/repos/draios/sysdig/issues/701/comments","statuses_url":"https://api.github.com/repos/draios/sysdig/statuses/303df4ae3b8989a6ce785880ccab456909c63d19","head":{"label":"draios:expose-mesos-token","ref":"expose-mesos-token","sha":"303df4ae3b8989a6ce785880ccab456909c63d19","user":{"login":"draios","id":5068817,"avatar_url":"https://avatars.githubusercontent.com/u/5068817?v=3","gravatar_id":"","url":"https://api.github.com/users/draios","html_url":"https://github.com/draios","followers_url":"https://api.github.com/users/draios/followers","following_url":"https://api.github.com/users/draios/following{/other_user}","gists_url":"https://api.github.com/users/draios/gists{/gist_id}","starred_url":"https://api.github.com/users/draios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draios/subscriptions","organizations_url":"https://api.github.com/users/draios/orgs","repos_url":"https://api.github.com/users/draios/repos","events_url":"https://api.github.com/users/draios/events{/privacy}","received_events_url":"https://api.github.com/users/draios/received_events","type":"Organization","site_admin":false},"repo":{"id":15926180,"name":"sysdig","full_name":"draios/sysdig","owner":{"login":"draios","id":5068817,"avatar_url":"https://avatars.githubusercontent.com/u/5068817?v=3","gravatar_id":"","url":"https://api.github.com/users/draios","html_url":"https://github.com/draios","followers_url":"https://api.github.com/users/draios/followers","following_url":"https://api.github.com/users/draios/following{/other_user}","gists_url":"https://api.github.com/users/draios/gists{/gist_id}","starred_url":"https://api.github.com/users/draios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draios/subscriptions","organizations_url":"https://api.github.com/users/draios/orgs","repos_url":"https://api.github.com/users/draios/repos","events_url":"https://api.github.com/users/draios/events{/privacy}","received_events_url":"https://api.github.com/users/draios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/draios/sysdig","description":"Linux system exploration and troubleshooting tool with first class support for containers","fork":false,"url":"https://api.github.com/repos/draios/sysdig","forks_url":"https://api.github.com/repos/draios/sysdig/forks","keys_url":"https://api.github.com/repos/draios/sysdig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/draios/sysdig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/draios/sysdig/teams","hooks_url":"https://api.github.com/repos/draios/sysdig/hooks","issue_events_url":"https://api.github.com/repos/draios/sysdig/issues/events{/number}","events_url":"https://api.github.com/repos/draios/sysdig/events","assignees_url":"https://api.github.com/repos/draios/sysdig/assignees{/user}","branches_url":"https://api.github.com/repos/draios/sysdig/branches{/branch}","tags_url":"https://api.github.com/repos/draios/sysdig/tags","blobs_url":"https://api.github.com/repos/draios/sysdig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/draios/sysdig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/draios/sysdig/git/refs{/sha}","trees_url":"https://api.github.com/repos/draios/sysdig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/draios/sysdig/statuses/{sha}","languages_url":"https://api.github.com/repos/draios/sysdig/languages","stargazers_url":"https://api.github.com/repos/draios/sysdig/stargazers","contributors_url":"https://api.github.com/repos/draios/sysdig/contributors","subscribers_url":"https://api.github.com/repos/draios/sysdig/subscribers","subscription_url":"https://api.github.com/repos/draios/sysdig/subscription","commits_url":"https://api.github.com/repos/draios/sysdig/commits{/sha}","git_commits_url":"https://api.github.com/repos/draios/sysdig/git/commits{/sha}","comments_url":"https://api.github.com/repos/draios/sysdig/comments{/number}","issue_comment_url":"https://api.github.com/repos/draios/sysdig/issues/comments{/number}","contents_url":"https://api.github.com/repos/draios/sysdig/contents/{+path}","compare_url":"https://api.github.com/repos/draios/sysdig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/draios/sysdig/merges","archive_url":"https://api.github.com/repos/draios/sysdig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/draios/sysdig/downloads","issues_url":"https://api.github.com/repos/draios/sysdig/issues{/number}","pulls_url":"https://api.github.com/repos/draios/sysdig/pulls{/number}","milestones_url":"https://api.github.com/repos/draios/sysdig/milestones{/number}","notifications_url":"https://api.github.com/repos/draios/sysdig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/draios/sysdig/labels{/name}","releases_url":"https://api.github.com/repos/draios/sysdig/releases{/id}","deployments_url":"https://api.github.com/repos/draios/sysdig/deployments","created_at":"2014-01-15T05:45:17Z","updated_at":"2016-12-22T21:07:43Z","pushed_at":"2016-12-23T00:26:07Z","git_url":"git://github.com/draios/sysdig.git","ssh_url":"git@github.com:draios/sysdig.git","clone_url":"https://github.com/draios/sysdig.git","svn_url":"https://github.com/draios/sysdig","homepage":"http://www.sysdig.org/","size":10594,"stargazers_count":4130,"watchers_count":4130,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":388,"mirror_url":null,"open_issues_count":121,"forks":388,"open_issues":121,"watchers":4130,"default_branch":"dev"}},"base":{"label":"draios:dev","ref":"dev","sha":"e8b78abf798cbcfa33cfa205b1597d97d41ffbe7","user":{"login":"draios","id":5068817,"avatar_url":"https://avatars.githubusercontent.com/u/5068817?v=3","gravatar_id":"","url":"https://api.github.com/users/draios","html_url":"https://github.com/draios","followers_url":"https://api.github.com/users/draios/followers","following_url":"https://api.github.com/users/draios/following{/other_user}","gists_url":"https://api.github.com/users/draios/gists{/gist_id}","starred_url":"https://api.github.com/users/draios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draios/subscriptions","organizations_url":"https://api.github.com/users/draios/orgs","repos_url":"https://api.github.com/users/draios/repos","events_url":"https://api.github.com/users/draios/events{/privacy}","received_events_url":"https://api.github.com/users/draios/received_events","type":"Organization","site_admin":false},"repo":{"id":15926180,"name":"sysdig","full_name":"draios/sysdig","owner":{"login":"draios","id":5068817,"avatar_url":"https://avatars.githubusercontent.com/u/5068817?v=3","gravatar_id":"","url":"https://api.github.com/users/draios","html_url":"https://github.com/draios","followers_url":"https://api.github.com/users/draios/followers","following_url":"https://api.github.com/users/draios/following{/other_user}","gists_url":"https://api.github.com/users/draios/gists{/gist_id}","starred_url":"https://api.github.com/users/draios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draios/subscriptions","organizations_url":"https://api.github.com/users/draios/orgs","repos_url":"https://api.github.com/users/draios/repos","events_url":"https://api.github.com/users/draios/events{/privacy}","received_events_url":"https://api.github.com/users/draios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/draios/sysdig","description":"Linux system exploration and troubleshooting tool with first class support for containers","fork":false,"url":"https://api.github.com/repos/draios/sysdig","forks_url":"https://api.github.com/repos/draios/sysdig/forks","keys_url":"https://api.github.com/repos/draios/sysdig/keys{/key_id}","collaborators_url":"https://api.github.com/repos/draios/sysdig/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/draios/sysdig/teams","hooks_url":"https://api.github.com/repos/draios/sysdig/hooks","issue_events_url":"https://api.github.com/repos/draios/sysdig/issues/events{/number}","events_url":"https://api.github.com/repos/draios/sysdig/events","assignees_url":"https://api.github.com/repos/draios/sysdig/assignees{/user}","branches_url":"https://api.github.com/repos/draios/sysdig/branches{/branch}","tags_url":"https://api.github.com/repos/draios/sysdig/tags","blobs_url":"https://api.github.com/repos/draios/sysdig/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/draios/sysdig/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/draios/sysdig/git/refs{/sha}","trees_url":"https://api.github.com/repos/draios/sysdig/git/trees{/sha}","statuses_url":"https://api.github.com/repos/draios/sysdig/statuses/{sha}","languages_url":"https://api.github.com/repos/draios/sysdig/languages","stargazers_url":"https://api.github.com/repos/draios/sysdig/stargazers","contributors_url":"https://api.github.com/repos/draios/sysdig/contributors","subscribers_url":"https://api.github.com/repos/draios/sysdig/subscribers","subscription_url":"https://api.github.com/repos/draios/sysdig/subscription","commits_url":"https://api.github.com/repos/draios/sysdig/commits{/sha}","git_commits_url":"https://api.github.com/repos/draios/sysdig/git/commits{/sha}","comments_url":"https://api.github.com/repos/draios/sysdig/comments{/number}","issue_comment_url":"https://api.github.com/repos/draios/sysdig/issues/comments{/number}","contents_url":"https://api.github.com/repos/draios/sysdig/contents/{+path}","compare_url":"https://api.github.com/repos/draios/sysdig/compare/{base}...{head}","merges_url":"https://api.github.com/repos/draios/sysdig/merges","archive_url":"https://api.github.com/repos/draios/sysdig/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/draios/sysdig/downloads","issues_url":"https://api.github.com/repos/draios/sysdig/issues{/number}","pulls_url":"https://api.github.com/repos/draios/sysdig/pulls{/number}","milestones_url":"https://api.github.com/repos/draios/sysdig/milestones{/number}","notifications_url":"https://api.github.com/repos/draios/sysdig/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/draios/sysdig/labels{/name}","releases_url":"https://api.github.com/repos/draios/sysdig/releases{/id}","deployments_url":"https://api.github.com/repos/draios/sysdig/deployments","created_at":"2014-01-15T05:45:17Z","updated_at":"2016-12-22T21:07:43Z","pushed_at":"2016-12-23T00:26:07Z","git_url":"git://github.com/draios/sysdig.git","ssh_url":"git@github.com:draios/sysdig.git","clone_url":"https://github.com/draios/sysdig.git","svn_url":"https://github.com/draios/sysdig","homepage":"http://www.sysdig.org/","size":10594,"stargazers_count":4130,"watchers_count":4130,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":388,"mirror_url":null,"open_issues_count":121,"forks":388,"open_issues":121,"watchers":4130,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/draios/sysdig/pulls/701"},"html":{"href":"https://github.com/draios/sysdig/pull/701"},"issue":{"href":"https://api.github.com/repos/draios/sysdig/issues/701"},"comments":{"href":"https://api.github.com/repos/draios/sysdig/issues/701/comments"},"review_comments":{"href":"https://api.github.com/repos/draios/sysdig/pulls/701/comments"},"review_comment":{"href":"https://api.github.com/repos/draios/sysdig/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/draios/sysdig/pulls/701/commits"},"statuses":{"href":"https://api.github.com/repos/draios/sysdig/statuses/303df4ae3b8989a6ce785880ccab456909c63d19"}}}}
{"actor":{"display_login":"mstemm"}}