{"action":"created","comment":{"url":"https://api.github.com/repos/eedevops/he-design/pulls/comments/82169404","pull_request_review_id":3094412,"id":82169404,"diff_hunk":"@@ -137,22 +143,21 @@ Used by integration developers to register their integration with `hubot-enterpr\n     - if authed: pass secrets to function\n     - if not: send _private message_ to user and start auth process\n \n-\n * **Conceptual execution**\n \n   ```coffeescript\n \n    robot.e.create = (info, callback) ->\n   # robot.e.create code\n   robot[info.type] re, (msg) ->\n-    # check if integration+function have auth\n     if registrar[integration].auth && info.auth\n+    # check if integration+function have auth\n     # pass auth to auth engine (use bluebird promises)\n     return auth_engine.authenticated(userInfo, integration)\n-    .then (res) ->\n+    .then (auth_obj) ->\n       # add secrets to msg object\n-      msg.auth_secrets = res\n-      callback(msg)\n+      # not adding auth_obj on msg, so it would not be exposed to all code\n+      callback(msg, auth_obj)","path":"hubot_enterprise.md","position":44,"original_position":44,"commit_id":"1f12151d8ac5108610d878f23995c0400f01564d","original_commit_id":"1f12151d8ac5108610d878f23995c0400f01564d","user":{"login":"mosheBelostotsky","id":19250634,"avatar_url":"https://avatars.githubusercontent.com/u/19250634?v=3","gravatar_id":"","url":"https://api.github.com/users/mosheBelostotsky","html_url":"https://github.com/mosheBelostotsky","followers_url":"https://api.github.com/users/mosheBelostotsky/followers","following_url":"https://api.github.com/users/mosheBelostotsky/following{/other_user}","gists_url":"https://api.github.com/users/mosheBelostotsky/gists{/gist_id}","starred_url":"https://api.github.com/users/mosheBelostotsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosheBelostotsky/subscriptions","organizations_url":"https://api.github.com/users/mosheBelostotsky/orgs","repos_url":"https://api.github.com/users/mosheBelostotsky/repos","events_url":"https://api.github.com/users/mosheBelostotsky/events{/privacy}","received_events_url":"https://api.github.com/users/mosheBelostotsky/received_events","type":"User","site_admin":false},"body":"is there a way for the callback to **revoke** the auth tokens?\r\ne.g: when finding out that tokens are expired during a call?","created_at":"2016-10-06T11:42:15Z","updated_at":"2016-10-06T11:42:15Z","html_url":"https://github.com/eedevops/he-design/pull/20#discussion_r82169404","pull_request_url":"https://api.github.com/repos/eedevops/he-design/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/eedevops/he-design/pulls/comments/82169404"},"html":{"href":"https://github.com/eedevops/he-design/pull/20#discussion_r82169404"},"pull_request":{"href":"https://api.github.com/repos/eedevops/he-design/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/eedevops/he-design/pulls/20","id":88245558,"html_url":"https://github.com/eedevops/he-design/pull/20","diff_url":"https://github.com/eedevops/he-design/pull/20.diff","patch_url":"https://github.com/eedevops/he-design/pull/20.patch","issue_url":"https://api.github.com/repos/eedevops/he-design/issues/20","number":20,"state":"open","locked":false,"title":"updated robot.e.registerIntegration and robot.e.create auth handling","user":{"login":"mosheBelostotsky","id":19250634,"avatar_url":"https://avatars.githubusercontent.com/u/19250634?v=3","gravatar_id":"","url":"https://api.github.com/users/mosheBelostotsky","html_url":"https://github.com/mosheBelostotsky","followers_url":"https://api.github.com/users/mosheBelostotsky/followers","following_url":"https://api.github.com/users/mosheBelostotsky/following{/other_user}","gists_url":"https://api.github.com/users/mosheBelostotsky/gists{/gist_id}","starred_url":"https://api.github.com/users/mosheBelostotsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mosheBelostotsky/subscriptions","organizations_url":"https://api.github.com/users/mosheBelostotsky/orgs","repos_url":"https://api.github.com/users/mosheBelostotsky/repos","events_url":"https://api.github.com/users/mosheBelostotsky/events{/privacy}","received_events_url":"https://api.github.com/users/mosheBelostotsky/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-06T11:40:20Z","updated_at":"2016-10-06T11:42:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8d579a0f0a099f09fe42ea1bf6c3d94a2f363edc","assignee":{"login":"rqc","id":89690,"avatar_url":"https://avatars.githubusercontent.com/u/89690?v=3","gravatar_id":"","url":"https://api.github.com/users/rqc","html_url":"https://github.com/rqc","followers_url":"https://api.github.com/users/rqc/followers","following_url":"https://api.github.com/users/rqc/following{/other_user}","gists_url":"https://api.github.com/users/rqc/gists{/gist_id}","starred_url":"https://api.github.com/users/rqc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rqc/subscriptions","organizations_url":"https://api.github.com/users/rqc/orgs","repos_url":"https://api.github.com/users/rqc/repos","events_url":"https://api.github.com/users/rqc/events{/privacy}","received_events_url":"https://api.github.com/users/rqc/received_events","type":"User","site_admin":false},"assignees":[{"login":"rqc","id":89690,"avatar_url":"https://avatars.githubusercontent.com/u/89690?v=3","gravatar_id":"","url":"https://api.github.com/users/rqc","html_url":"https://github.com/rqc","followers_url":"https://api.github.com/users/rqc/followers","following_url":"https://api.github.com/users/rqc/following{/other_user}","gists_url":"https://api.github.com/users/rqc/gists{/gist_id}","starred_url":"https://api.github.com/users/rqc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rqc/subscriptions","organizations_url":"https://api.github.com/users/rqc/orgs","repos_url":"https://api.github.com/users/rqc/repos","events_url":"https://api.github.com/users/rqc/events{/privacy}","received_events_url":"https://api.github.com/users/rqc/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/eedevops/he-design/pulls/20/commits","review_comments_url":"https://api.github.com/repos/eedevops/he-design/pulls/20/comments","review_comment_url":"https://api.github.com/repos/eedevops/he-design/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eedevops/he-design/issues/20/comments","statuses_url":"https://api.github.com/repos/eedevops/he-design/statuses/1f12151d8ac5108610d878f23995c0400f01564d","head":{"label":"eedevops:feature/he_usage","ref":"feature/he_usage","sha":"1f12151d8ac5108610d878f23995c0400f01564d","user":{"login":"eedevops","id":16719882,"avatar_url":"https://avatars.githubusercontent.com/u/16719882?v=3","gravatar_id":"","url":"https://api.github.com/users/eedevops","html_url":"https://github.com/eedevops","followers_url":"https://api.github.com/users/eedevops/followers","following_url":"https://api.github.com/users/eedevops/following{/other_user}","gists_url":"https://api.github.com/users/eedevops/gists{/gist_id}","starred_url":"https://api.github.com/users/eedevops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eedevops/subscriptions","organizations_url":"https://api.github.com/users/eedevops/orgs","repos_url":"https://api.github.com/users/eedevops/repos","events_url":"https://api.github.com/users/eedevops/events{/privacy}","received_events_url":"https://api.github.com/users/eedevops/received_events","type":"Organization","site_admin":false},"repo":{"id":65206729,"name":"he-design","full_name":"eedevops/he-design","owner":{"login":"eedevops","id":16719882,"avatar_url":"https://avatars.githubusercontent.com/u/16719882?v=3","gravatar_id":"","url":"https://api.github.com/users/eedevops","html_url":"https://github.com/eedevops","followers_url":"https://api.github.com/users/eedevops/followers","following_url":"https://api.github.com/users/eedevops/following{/other_user}","gists_url":"https://api.github.com/users/eedevops/gists{/gist_id}","starred_url":"https://api.github.com/users/eedevops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eedevops/subscriptions","organizations_url":"https://api.github.com/users/eedevops/orgs","repos_url":"https://api.github.com/users/eedevops/repos","events_url":"https://api.github.com/users/eedevops/events{/privacy}","received_events_url":"https://api.github.com/users/eedevops/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eedevops/he-design","description":"Design documents for Hubot Enterprise","fork":false,"url":"https://api.github.com/repos/eedevops/he-design","forks_url":"https://api.github.com/repos/eedevops/he-design/forks","keys_url":"https://api.github.com/repos/eedevops/he-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eedevops/he-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eedevops/he-design/teams","hooks_url":"https://api.github.com/repos/eedevops/he-design/hooks","issue_events_url":"https://api.github.com/repos/eedevops/he-design/issues/events{/number}","events_url":"https://api.github.com/repos/eedevops/he-design/events","assignees_url":"https://api.github.com/repos/eedevops/he-design/assignees{/user}","branches_url":"https://api.github.com/repos/eedevops/he-design/branches{/branch}","tags_url":"https://api.github.com/repos/eedevops/he-design/tags","blobs_url":"https://api.github.com/repos/eedevops/he-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eedevops/he-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eedevops/he-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/eedevops/he-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eedevops/he-design/statuses/{sha}","languages_url":"https://api.github.com/repos/eedevops/he-design/languages","stargazers_url":"https://api.github.com/repos/eedevops/he-design/stargazers","contributors_url":"https://api.github.com/repos/eedevops/he-design/contributors","subscribers_url":"https://api.github.com/repos/eedevops/he-design/subscribers","subscription_url":"https://api.github.com/repos/eedevops/he-design/subscription","commits_url":"https://api.github.com/repos/eedevops/he-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/eedevops/he-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/eedevops/he-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/eedevops/he-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/eedevops/he-design/contents/{+path}","compare_url":"https://api.github.com/repos/eedevops/he-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eedevops/he-design/merges","archive_url":"https://api.github.com/repos/eedevops/he-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eedevops/he-design/downloads","issues_url":"https://api.github.com/repos/eedevops/he-design/issues{/number}","pulls_url":"https://api.github.com/repos/eedevops/he-design/pulls{/number}","milestones_url":"https://api.github.com/repos/eedevops/he-design/milestones{/number}","notifications_url":"https://api.github.com/repos/eedevops/he-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eedevops/he-design/labels{/name}","releases_url":"https://api.github.com/repos/eedevops/he-design/releases{/id}","deployments_url":"https://api.github.com/repos/eedevops/he-design/deployments","created_at":"2016-08-08T13:33:30Z","updated_at":"2016-09-12T12:30:10Z","pushed_at":"2016-10-06T11:40:20Z","git_url":"git://github.com/eedevops/he-design.git","ssh_url":"git@github.com:eedevops/he-design.git","clone_url":"https://github.com/eedevops/he-design.git","svn_url":"https://github.com/eedevops/he-design","homepage":"","size":748,"stargazers_count":1,"watchers_count":1,"language":"RAML","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":1,"default_branch":"master"}},"base":{"label":"eedevops:master","ref":"master","sha":"b99775128de2f2eb70dfc3f6b7e0ae0f69ede6da","user":{"login":"eedevops","id":16719882,"avatar_url":"https://avatars.githubusercontent.com/u/16719882?v=3","gravatar_id":"","url":"https://api.github.com/users/eedevops","html_url":"https://github.com/eedevops","followers_url":"https://api.github.com/users/eedevops/followers","following_url":"https://api.github.com/users/eedevops/following{/other_user}","gists_url":"https://api.github.com/users/eedevops/gists{/gist_id}","starred_url":"https://api.github.com/users/eedevops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eedevops/subscriptions","organizations_url":"https://api.github.com/users/eedevops/orgs","repos_url":"https://api.github.com/users/eedevops/repos","events_url":"https://api.github.com/users/eedevops/events{/privacy}","received_events_url":"https://api.github.com/users/eedevops/received_events","type":"Organization","site_admin":false},"repo":{"id":65206729,"name":"he-design","full_name":"eedevops/he-design","owner":{"login":"eedevops","id":16719882,"avatar_url":"https://avatars.githubusercontent.com/u/16719882?v=3","gravatar_id":"","url":"https://api.github.com/users/eedevops","html_url":"https://github.com/eedevops","followers_url":"https://api.github.com/users/eedevops/followers","following_url":"https://api.github.com/users/eedevops/following{/other_user}","gists_url":"https://api.github.com/users/eedevops/gists{/gist_id}","starred_url":"https://api.github.com/users/eedevops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eedevops/subscriptions","organizations_url":"https://api.github.com/users/eedevops/orgs","repos_url":"https://api.github.com/users/eedevops/repos","events_url":"https://api.github.com/users/eedevops/events{/privacy}","received_events_url":"https://api.github.com/users/eedevops/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eedevops/he-design","description":"Design documents for Hubot Enterprise","fork":false,"url":"https://api.github.com/repos/eedevops/he-design","forks_url":"https://api.github.com/repos/eedevops/he-design/forks","keys_url":"https://api.github.com/repos/eedevops/he-design/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eedevops/he-design/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eedevops/he-design/teams","hooks_url":"https://api.github.com/repos/eedevops/he-design/hooks","issue_events_url":"https://api.github.com/repos/eedevops/he-design/issues/events{/number}","events_url":"https://api.github.com/repos/eedevops/he-design/events","assignees_url":"https://api.github.com/repos/eedevops/he-design/assignees{/user}","branches_url":"https://api.github.com/repos/eedevops/he-design/branches{/branch}","tags_url":"https://api.github.com/repos/eedevops/he-design/tags","blobs_url":"https://api.github.com/repos/eedevops/he-design/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eedevops/he-design/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eedevops/he-design/git/refs{/sha}","trees_url":"https://api.github.com/repos/eedevops/he-design/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eedevops/he-design/statuses/{sha}","languages_url":"https://api.github.com/repos/eedevops/he-design/languages","stargazers_url":"https://api.github.com/repos/eedevops/he-design/stargazers","contributors_url":"https://api.github.com/repos/eedevops/he-design/contributors","subscribers_url":"https://api.github.com/repos/eedevops/he-design/subscribers","subscription_url":"https://api.github.com/repos/eedevops/he-design/subscription","commits_url":"https://api.github.com/repos/eedevops/he-design/commits{/sha}","git_commits_url":"https://api.github.com/repos/eedevops/he-design/git/commits{/sha}","comments_url":"https://api.github.com/repos/eedevops/he-design/comments{/number}","issue_comment_url":"https://api.github.com/repos/eedevops/he-design/issues/comments{/number}","contents_url":"https://api.github.com/repos/eedevops/he-design/contents/{+path}","compare_url":"https://api.github.com/repos/eedevops/he-design/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eedevops/he-design/merges","archive_url":"https://api.github.com/repos/eedevops/he-design/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eedevops/he-design/downloads","issues_url":"https://api.github.com/repos/eedevops/he-design/issues{/number}","pulls_url":"https://api.github.com/repos/eedevops/he-design/pulls{/number}","milestones_url":"https://api.github.com/repos/eedevops/he-design/milestones{/number}","notifications_url":"https://api.github.com/repos/eedevops/he-design/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eedevops/he-design/labels{/name}","releases_url":"https://api.github.com/repos/eedevops/he-design/releases{/id}","deployments_url":"https://api.github.com/repos/eedevops/he-design/deployments","created_at":"2016-08-08T13:33:30Z","updated_at":"2016-09-12T12:30:10Z","pushed_at":"2016-10-06T11:40:20Z","git_url":"git://github.com/eedevops/he-design.git","ssh_url":"git@github.com:eedevops/he-design.git","clone_url":"https://github.com/eedevops/he-design.git","svn_url":"https://github.com/eedevops/he-design","homepage":"","size":748,"stargazers_count":1,"watchers_count":1,"language":"RAML","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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eedevops/he-design/pulls/20"},"html":{"href":"https://github.com/eedevops/he-design/pull/20"},"issue":{"href":"https://api.github.com/repos/eedevops/he-design/issues/20"},"comments":{"href":"https://api.github.com/repos/eedevops/he-design/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/eedevops/he-design/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/eedevops/he-design/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eedevops/he-design/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/eedevops/he-design/statuses/1f12151d8ac5108610d878f23995c0400f01564d"}}}}
{"actor":{"display_login":"mosheBelostotsky"}}