payload: {"action":"created","comment":{"url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/comments/278119029","pull_request_review_id":230101474,"id":278119029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3ODExOTAyOQ==","diff_hunk":"@@ -0,0 +1,44 @@\n+import { AppSecurity } from '@aerogear/security';\n+import { Injectable } from '@angular/core';\n+import { OpenShiftService } from './openshift.service';\n+import { VoyagerService } from './sync/voyager.service';\n+import { AuthContextProvider } from '@aerogear/voyager-client';\n+import { Platform } from '@ionic/angular';\n+import { getUrl } from '@ionic/angular/dist/directives/navigation/stack-utils';\n+\n+@Injectable({\n+    providedIn: 'root'\n+})\n+/**\n+ * Service provides Apollo Voyager client\n+ */\n+export class SecurityService {\n+  public security: AppSecurity | undefined;\n+  public initialized: Promise<boolean>;\n+  private readonly aerogear: VoyagerService;\n+\n+  constructor(private openShift: OpenShiftService, public platform: Platform, aerogear: VoyagerService) {\n+      if (this.isEnabled()) {\n+          this.security = new AppSecurity(this.openShift.getConfig());\n+          this.aerogear = aerogear;\n+      }\n+  }\n+\n+  getConfig() {\n+    const config = this.security.getConfig();","path":"src/app/services/security.service.ts","position":28,"original_position":28,"commit_id":"cede7f759ea7b87ccf8c349f895dfbc0f0e157bd","original_commit_id":"cede7f759ea7b87ccf8c349f895dfbc0f0e157bd","user":{"login":"craicoverflow","id":11743717,"node_id":"MDQ6VXNlcjExNzQzNzE3","avatar_url":"https://avatars2.githubusercontent.com/u/11743717?v=4","gravatar_id":"","url":"https://api.github.com/users/craicoverflow","html_url":"https://github.com/craicoverflow","followers_url":"https://api.github.com/users/craicoverflow/followers","following_url":"https://api.github.com/users/craicoverflow/following{/other_user}","gists_url":"https://api.github.com/users/craicoverflow/gists{/gist_id}","starred_url":"https://api.github.com/users/craicoverflow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craicoverflow/subscriptions","organizations_url":"https://api.github.com/users/craicoverflow/orgs","repos_url":"https://api.github.com/users/craicoverflow/repos","events_url":"https://api.github.com/users/craicoverflow/events{/privacy}","received_events_url":"https://api.github.com/users/craicoverflow/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n    return this.security.getConfig();\r\n```","created_at":"2019-04-24T13:17:18Z","updated_at":"2019-04-24T13:17:18Z","html_url":"https://github.com/aerogear/ionic-showcase/pull/154#discussion_r278119029","pull_request_url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/comments/278119029"},"html":{"href":"https://github.com/aerogear/ionic-showcase/pull/154#discussion_r278119029"},"pull_request":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154","id":271264894,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcxMjY0ODk0","html_url":"https://github.com/aerogear/ionic-showcase/pull/154","diff_url":"https://github.com/aerogear/ionic-showcase/pull/154.diff","patch_url":"https://github.com/aerogear/ionic-showcase/pull/154.patch","issue_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues/154","number":154,"state":"open","locked":false,"title":"feat(app-trust): add a button to connect to the mobile security servi…","user":{"login":"austincunningham","id":16667688,"node_id":"MDQ6VXNlcjE2NjY3Njg4","avatar_url":"https://avatars2.githubusercontent.com/u/16667688?v=4","gravatar_id":"","url":"https://api.github.com/users/austincunningham","html_url":"https://github.com/austincunningham","followers_url":"https://api.github.com/users/austincunningham/followers","following_url":"https://api.github.com/users/austincunningham/following{/other_user}","gists_url":"https://api.github.com/users/austincunningham/gists{/gist_id}","starred_url":"https://api.github.com/users/austincunningham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/austincunningham/subscriptions","organizations_url":"https://api.github.com/users/austincunningham/orgs","repos_url":"https://api.github.com/users/austincunningham/repos","events_url":"https://api.github.com/users/austincunningham/events{/privacy}","received_events_url":"https://api.github.com/users/austincunningham/received_events","type":"User","site_admin":false},"body":"<!--\r\nThank you for your pull request. Please provide a description above and review\r\nthe requirements below.\r\n\r\nBug fixes and new features should include tests.\r\n-->\r\n\r\n### Description\r\n# What\r\nAdd a page to the ionic-showcase app to demo the App Trust functionality \r\n\r\n# Why \r\nhttps://issues.jboss.org/browse/AEROGEAR-8690 \r\n\r\n# Verification \r\n\r\n- clone mobile security service https://github.com/aerogear/mobile-security-service\r\n- cd to the repo \r\n- start the db \r\n```bash\r\ndocker-compose up -d db\r\n```\r\n- start the server\r\n```bash\r\nmake serve\r\n```\r\n- clone the ionic-showcase https://github.com/aerogear/ionic-showcase\r\n- cd to the repo\r\n- checkout this branch `AEROGEAR-8690`\r\n- change the mobile-services.js to \r\n```js\r\nlet config = {\r\n  \"version\": 1,\r\n  \"namespace\": \"voyager\",\r\n  \"clientId\": \"voyager-ionic-example\",\r\n  \"services\": [\r\n    {\r\n      \"id\": \"security\",\r\n      \"name\": \"security\",\r\n      \"type\": \"security\",\r\n      \"url\": \"http://10.0.2.2:3000\",\r\n      \"config\": {\r\n        \"mobile-security-server-url\": \"http://10.0.2.2:3000\"\r\n\r\n      }\r\n    }\r\n  ]\r\n};\r\n\r\nmodule.exports = config;\r\n\r\n```\r\n\r\n- install\r\n```bash\r\nnpm i\r\n````\r\n- run an android build \r\n```bash\r\nionic cordova build android\r\n```\r\n- copy the apk file to an android emulator \r\n- Check to see if the following functionality is present \r\n\r\n![aerogear-demo](https://user-images.githubusercontent.com/16667688/56582990-7611ed00-65d0-11e9-8e60-23d7692c9c56.gif)\r\n\r\n<!-- Please provide a description of your pull request and any relevant steps needed to verify it -->\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [x] `npm test` passes\r\n- [x] `npm run build` works\r\n","created_at":"2019-04-17T11:23:15Z","updated_at":"2019-04-24T13:17:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aff093f2167d4918c6b93a3b15eb96faa7490a9c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"davidffrench","id":1596014,"node_id":"MDQ6VXNlcjE1OTYwMTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1596014?v=4","gravatar_id":"","url":"https://api.github.com/users/davidffrench","html_url":"https://github.com/davidffrench","followers_url":"https://api.github.com/users/davidffrench/followers","following_url":"https://api.github.com/users/davidffrench/following{/other_user}","gists_url":"https://api.github.com/users/davidffrench/gists{/gist_id}","starred_url":"https://api.github.com/users/davidffrench/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidffrench/subscriptions","organizations_url":"https://api.github.com/users/davidffrench/orgs","repos_url":"https://api.github.com/users/davidffrench/repos","events_url":"https://api.github.com/users/davidffrench/events{/privacy}","received_events_url":"https://api.github.com/users/davidffrench/received_events","type":"User","site_admin":false},{"login":"piccolazucca","id":24867345,"node_id":"MDQ6VXNlcjI0ODY3MzQ1","avatar_url":"https://avatars1.githubusercontent.com/u/24867345?v=4","gravatar_id":"","url":"https://api.github.com/users/piccolazucca","html_url":"https://github.com/piccolazucca","followers_url":"https://api.github.com/users/piccolazucca/followers","following_url":"https://api.github.com/users/piccolazucca/following{/other_user}","gists_url":"https://api.github.com/users/piccolazucca/gists{/gist_id}","starred_url":"https://api.github.com/users/piccolazucca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piccolazucca/subscriptions","organizations_url":"https://api.github.com/users/piccolazucca/orgs","repos_url":"https://api.github.com/users/piccolazucca/repos","events_url":"https://api.github.com/users/piccolazucca/events{/privacy}","received_events_url":"https://api.github.com/users/piccolazucca/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154/commits","review_comments_url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154/comments","review_comment_url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues/154/comments","statuses_url":"https://api.github.com/repos/aerogear/ionic-showcase/statuses/cede7f759ea7b87ccf8c349f895dfbc0f0e157bd","head":{"label":"aerogear:AEROGEAR-8690","ref":"AEROGEAR-8690","sha":"cede7f759ea7b87ccf8c349f895dfbc0f0e157bd","user":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"repo":{"id":160690050,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA2OTAwNTA=","name":"ionic-showcase","full_name":"aerogear/ionic-showcase","private":false,"owner":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aerogear/ionic-showcase","description":"Demo app for enterprise ready Mobile Developer Services","fork":false,"url":"https://api.github.com/repos/aerogear/ionic-showcase","forks_url":"https://api.github.com/repos/aerogear/ionic-showcase/forks","keys_url":"https://api.github.com/repos/aerogear/ionic-showcase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aerogear/ionic-showcase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aerogear/ionic-showcase/teams","hooks_url":"https://api.github.com/repos/aerogear/ionic-showcase/hooks","issue_events_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues/events{/number}","events_url":"https://api.github.com/repos/aerogear/ionic-showcase/events","assignees_url":"https://api.github.com/repos/aerogear/ionic-showcase/assignees{/user}","branches_url":"https://api.github.com/repos/aerogear/ionic-showcase/branches{/branch}","tags_url":"https://api.github.com/repos/aerogear/ionic-showcase/tags","blobs_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/refs{/sha}","trees_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aerogear/ionic-showcase/statuses/{sha}","languages_url":"https://api.github.com/repos/aerogear/ionic-showcase/languages","stargazers_url":"https://api.github.com/repos/aerogear/ionic-showcase/stargazers","contributors_url":"https://api.github.com/repos/aerogear/ionic-showcase/contributors","subscribers_url":"https://api.github.com/repos/aerogear/ionic-showcase/subscribers","subscription_url":"https://api.github.com/repos/aerogear/ionic-showcase/subscription","commits_url":"https://api.github.com/repos/aerogear/ionic-showcase/commits{/sha}","git_commits_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/commits{/sha}","comments_url":"https://api.github.com/repos/aerogear/ionic-showcase/comments{/number}","issue_comment_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues/comments{/number}","contents_url":"https://api.github.com/repos/aerogear/ionic-showcase/contents/{+path}","compare_url":"https://api.github.com/repos/aerogear/ionic-showcase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aerogear/ionic-showcase/merges","archive_url":"https://api.github.com/repos/aerogear/ionic-showcase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aerogear/ionic-showcase/downloads","issues_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues{/number}","pulls_url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls{/number}","milestones_url":"https://api.github.com/repos/aerogear/ionic-showcase/milestones{/number}","notifications_url":"https://api.github.com/repos/aerogear/ionic-showcase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aerogear/ionic-showcase/labels{/name}","releases_url":"https://api.github.com/repos/aerogear/ionic-showcase/releases{/id}","deployments_url":"https://api.github.com/repos/aerogear/ionic-showcase/deployments","created_at":"2018-12-06T14:57:29Z","updated_at":"2019-04-24T07:53:58Z","pushed_at":"2019-04-24T12:47:24Z","git_url":"git://github.com/aerogear/ionic-showcase.git","ssh_url":"git@github.com:aerogear/ionic-showcase.git","clone_url":"https://github.com/aerogear/ionic-showcase.git","svn_url":"https://github.com/aerogear/ionic-showcase","homepage":"http://aerogear.org","size":6034,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":18,"open_issues":7,"watchers":6,"default_branch":"master"}},"base":{"label":"aerogear:app-security","ref":"app-security","sha":"fe0e16a5e2c118df26117b9a404b57bb8b109e11","user":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"repo":{"id":160690050,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA2OTAwNTA=","name":"ionic-showcase","full_name":"aerogear/ionic-showcase","private":false,"owner":{"login":"aerogear","id":954205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk1NDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/954205?v=4","gravatar_id":"","url":"https://api.github.com/users/aerogear","html_url":"https://github.com/aerogear","followers_url":"https://api.github.com/users/aerogear/followers","following_url":"https://api.github.com/users/aerogear/following{/other_user}","gists_url":"https://api.github.com/users/aerogear/gists{/gist_id}","starred_url":"https://api.github.com/users/aerogear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerogear/subscriptions","organizations_url":"https://api.github.com/users/aerogear/orgs","repos_url":"https://api.github.com/users/aerogear/repos","events_url":"https://api.github.com/users/aerogear/events{/privacy}","received_events_url":"https://api.github.com/users/aerogear/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/aerogear/ionic-showcase","description":"Demo app for enterprise ready Mobile Developer Services","fork":false,"url":"https://api.github.com/repos/aerogear/ionic-showcase","forks_url":"https://api.github.com/repos/aerogear/ionic-showcase/forks","keys_url":"https://api.github.com/repos/aerogear/ionic-showcase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aerogear/ionic-showcase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aerogear/ionic-showcase/teams","hooks_url":"https://api.github.com/repos/aerogear/ionic-showcase/hooks","issue_events_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues/events{/number}","events_url":"https://api.github.com/repos/aerogear/ionic-showcase/events","assignees_url":"https://api.github.com/repos/aerogear/ionic-showcase/assignees{/user}","branches_url":"https://api.github.com/repos/aerogear/ionic-showcase/branches{/branch}","tags_url":"https://api.github.com/repos/aerogear/ionic-showcase/tags","blobs_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/refs{/sha}","trees_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aerogear/ionic-showcase/statuses/{sha}","languages_url":"https://api.github.com/repos/aerogear/ionic-showcase/languages","stargazers_url":"https://api.github.com/repos/aerogear/ionic-showcase/stargazers","contributors_url":"https://api.github.com/repos/aerogear/ionic-showcase/contributors","subscribers_url":"https://api.github.com/repos/aerogear/ionic-showcase/subscribers","subscription_url":"https://api.github.com/repos/aerogear/ionic-showcase/subscription","commits_url":"https://api.github.com/repos/aerogear/ionic-showcase/commits{/sha}","git_commits_url":"https://api.github.com/repos/aerogear/ionic-showcase/git/commits{/sha}","comments_url":"https://api.github.com/repos/aerogear/ionic-showcase/comments{/number}","issue_comment_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues/comments{/number}","contents_url":"https://api.github.com/repos/aerogear/ionic-showcase/contents/{+path}","compare_url":"https://api.github.com/repos/aerogear/ionic-showcase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aerogear/ionic-showcase/merges","archive_url":"https://api.github.com/repos/aerogear/ionic-showcase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aerogear/ionic-showcase/downloads","issues_url":"https://api.github.com/repos/aerogear/ionic-showcase/issues{/number}","pulls_url":"https://api.github.com/repos/aerogear/ionic-showcase/pulls{/number}","milestones_url":"https://api.github.com/repos/aerogear/ionic-showcase/milestones{/number}","notifications_url":"https://api.github.com/repos/aerogear/ionic-showcase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aerogear/ionic-showcase/labels{/name}","releases_url":"https://api.github.com/repos/aerogear/ionic-showcase/releases{/id}","deployments_url":"https://api.github.com/repos/aerogear/ionic-showcase/deployments","created_at":"2018-12-06T14:57:29Z","updated_at":"2019-04-24T07:53:58Z","pushed_at":"2019-04-24T12:47:24Z","git_url":"git://github.com/aerogear/ionic-showcase.git","ssh_url":"git@github.com:aerogear/ionic-showcase.git","clone_url":"https://github.com/aerogear/ionic-showcase.git","svn_url":"https://github.com/aerogear/ionic-showcase","homepage":"http://aerogear.org","size":6034,"stargazers_count":6,"watchers_count":6,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":18,"open_issues":7,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154"},"html":{"href":"https://github.com/aerogear/ionic-showcase/pull/154"},"issue":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/issues/154"},"comments":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/aerogear/ionic-showcase/statuses/cede7f759ea7b87ccf8c349f895dfbc0f0e157bd"}},"author_association":"NONE"}}
other: {"actor":{"display_login":"craicoverflow"}}