{"action":"created","comment":{"url":"https://api.github.com/repos/eShopWorld/sierra/pulls/comments/227298962","pull_request_review_id":167306212,"id":227298962,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzI5ODk2Mg==","diff_hunk":"@@ -0,0 +1,33 @@\n+﻿namespace Sierra.Common.DependencyInjection\n+{\n+    using Autofac;\n+    using Microsoft.Azure.Management.Fluent;\n+    using Microsoft.Azure.Management.ResourceManager.Fluent;\n+    using Microsoft.Azure.Management.ResourceManager.Fluent.Authentication;\n+    using Microsoft.Azure.Management.ResourceManager.Fluent.Core;\n+    using Microsoft.Azure.Services.AppAuthentication;\n+    using Microsoft.Rest;\n+\n+    public class AzureManagementFluentModule : Module\n+    {\n+        protected override void Load(ContainerBuilder builder)\n+        {\n+            // TODO: How to cache authentication token?\n+            builder.Register(c =>\n+            {\n+                var token = new AzureServiceTokenProvider()\n+                    .GetAccessTokenAsync(\"https://management.core.windows.net/\", string.Empty).Result;\n+                var tokenCredentials = new TokenCredentials(token);\n+\n+                var client = RestClient.Configure()\n+                    .WithEnvironment(AzureEnvironment.AzureGlobalCloud)\n+                    .WithLogLevel(HttpLoggingDelegatingHandler.Level.Basic)\n+                    .WithCredentials(new AzureCredentials(tokenCredentials, tokenCredentials, string.Empty,","path":"src/Sierra.Common/DependencyInjection/AzureManagementFluentModule.cs","position":25,"original_position":25,"commit_id":"25f8a7e05296c6bf5035936c1130a74e83fbdcba","original_commit_id":"25f8a7e05296c6bf5035936c1130a74e83fbdcba","user":{"login":"arturek","id":381257,"node_id":"MDQ6VXNlcjM4MTI1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/381257?v=4","gravatar_id":"","url":"https://api.github.com/users/arturek","html_url":"https://github.com/arturek","followers_url":"https://api.github.com/users/arturek/followers","following_url":"https://api.github.com/users/arturek/following{/other_user}","gists_url":"https://api.github.com/users/arturek/gists{/gist_id}","starred_url":"https://api.github.com/users/arturek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturek/subscriptions","organizations_url":"https://api.github.com/users/arturek/orgs","repos_url":"https://api.github.com/users/arturek/repos","events_url":"https://api.github.com/users/arturek/events{/privacy}","received_events_url":"https://api.github.com/users/arturek/received_events","type":"User","site_admin":false},"body":"It should be done this way, but this API doesn't seem to support it directly. Maybe it can be done using delegating handler but some simpler option would be nice.","created_at":"2018-10-23T09:14:54Z","updated_at":"2018-10-23T09:14:55Z","html_url":"https://github.com/eShopWorld/sierra/pull/25#discussion_r227298962","pull_request_url":"https://api.github.com/repos/eShopWorld/sierra/pulls/25","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eShopWorld/sierra/pulls/comments/227298962"},"html":{"href":"https://github.com/eShopWorld/sierra/pull/25#discussion_r227298962"},"pull_request":{"href":"https://api.github.com/repos/eShopWorld/sierra/pulls/25"}},"in_reply_to_id":227282498},"pull_request":{"url":"https://api.github.com/repos/eShopWorld/sierra/pulls/25","id":224260537,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MjYwNTM3","html_url":"https://github.com/eShopWorld/sierra/pull/25","diff_url":"https://github.com/eShopWorld/sierra/pull/25.diff","patch_url":"https://github.com/eShopWorld/sierra/pull/25.patch","issue_url":"https://api.github.com/repos/eShopWorld/sierra/issues/25","number":25,"state":"open","locked":false,"title":"ResourceGroup managment actor added","user":{"login":"arturek","id":381257,"node_id":"MDQ6VXNlcjM4MTI1Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/381257?v=4","gravatar_id":"","url":"https://api.github.com/users/arturek","html_url":"https://github.com/arturek","followers_url":"https://api.github.com/users/arturek/followers","following_url":"https://api.github.com/users/arturek/following{/other_user}","gists_url":"https://api.github.com/users/arturek/gists{/gist_id}","starred_url":"https://api.github.com/users/arturek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturek/subscriptions","organizations_url":"https://api.github.com/users/arturek/orgs","repos_url":"https://api.github.com/users/arturek/repos","events_url":"https://api.github.com/users/arturek/events{/privacy}","received_events_url":"https://api.github.com/users/arturek/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-19T11:51:04Z","updated_at":"2018-10-23T09:14:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59ae0f0a04f73076829ab04f541c9b6f16ff4b67","assignee":null,"assignees":[],"requested_reviewers":[{"login":"djfr","id":2116066,"node_id":"MDQ6VXNlcjIxMTYwNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/2116066?v=4","gravatar_id":"","url":"https://api.github.com/users/djfr","html_url":"https://github.com/djfr","followers_url":"https://api.github.com/users/djfr/followers","following_url":"https://api.github.com/users/djfr/following{/other_user}","gists_url":"https://api.github.com/users/djfr/gists{/gist_id}","starred_url":"https://api.github.com/users/djfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djfr/subscriptions","organizations_url":"https://api.github.com/users/djfr/orgs","repos_url":"https://api.github.com/users/djfr/repos","events_url":"https://api.github.com/users/djfr/events{/privacy}","received_events_url":"https://api.github.com/users/djfr/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eShopWorld/sierra/pulls/25/commits","review_comments_url":"https://api.github.com/repos/eShopWorld/sierra/pulls/25/comments","review_comment_url":"https://api.github.com/repos/eShopWorld/sierra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eShopWorld/sierra/issues/25/comments","statuses_url":"https://api.github.com/repos/eShopWorld/sierra/statuses/25f8a7e05296c6bf5035936c1130a74e83fbdcba","head":{"label":"eShopWorld:VSTS5748","ref":"VSTS5748","sha":"25f8a7e05296c6bf5035936c1130a74e83fbdcba","user":{"login":"eShopWorld","id":20441918,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDQxOTE4","avatar_url":"https://avatars0.githubusercontent.com/u/20441918?v=4","gravatar_id":"","url":"https://api.github.com/users/eShopWorld","html_url":"https://github.com/eShopWorld","followers_url":"https://api.github.com/users/eShopWorld/followers","following_url":"https://api.github.com/users/eShopWorld/following{/other_user}","gists_url":"https://api.github.com/users/eShopWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/eShopWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eShopWorld/subscriptions","organizations_url":"https://api.github.com/users/eShopWorld/orgs","repos_url":"https://api.github.com/users/eShopWorld/repos","events_url":"https://api.github.com/users/eShopWorld/events{/privacy}","received_events_url":"https://api.github.com/users/eShopWorld/received_events","type":"Organization","site_admin":false},"repo":{"id":110828494,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA4Mjg0OTQ=","name":"sierra","full_name":"eShopWorld/sierra","private":false,"owner":{"login":"eShopWorld","id":20441918,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDQxOTE4","avatar_url":"https://avatars0.githubusercontent.com/u/20441918?v=4","gravatar_id":"","url":"https://api.github.com/users/eShopWorld","html_url":"https://github.com/eShopWorld","followers_url":"https://api.github.com/users/eShopWorld/followers","following_url":"https://api.github.com/users/eShopWorld/following{/other_user}","gists_url":"https://api.github.com/users/eShopWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/eShopWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eShopWorld/subscriptions","organizations_url":"https://api.github.com/users/eShopWorld/orgs","repos_url":"https://api.github.com/users/eShopWorld/repos","events_url":"https://api.github.com/users/eShopWorld/events{/privacy}","received_events_url":"https://api.github.com/users/eShopWorld/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eShopWorld/sierra","description":"Tenant orchestration platform using ServiceFabric and VSTS CI/CD pipelines","fork":false,"url":"https://api.github.com/repos/eShopWorld/sierra","forks_url":"https://api.github.com/repos/eShopWorld/sierra/forks","keys_url":"https://api.github.com/repos/eShopWorld/sierra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eShopWorld/sierra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eShopWorld/sierra/teams","hooks_url":"https://api.github.com/repos/eShopWorld/sierra/hooks","issue_events_url":"https://api.github.com/repos/eShopWorld/sierra/issues/events{/number}","events_url":"https://api.github.com/repos/eShopWorld/sierra/events","assignees_url":"https://api.github.com/repos/eShopWorld/sierra/assignees{/user}","branches_url":"https://api.github.com/repos/eShopWorld/sierra/branches{/branch}","tags_url":"https://api.github.com/repos/eShopWorld/sierra/tags","blobs_url":"https://api.github.com/repos/eShopWorld/sierra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eShopWorld/sierra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eShopWorld/sierra/git/refs{/sha}","trees_url":"https://api.github.com/repos/eShopWorld/sierra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eShopWorld/sierra/statuses/{sha}","languages_url":"https://api.github.com/repos/eShopWorld/sierra/languages","stargazers_url":"https://api.github.com/repos/eShopWorld/sierra/stargazers","contributors_url":"https://api.github.com/repos/eShopWorld/sierra/contributors","subscribers_url":"https://api.github.com/repos/eShopWorld/sierra/subscribers","subscription_url":"https://api.github.com/repos/eShopWorld/sierra/subscription","commits_url":"https://api.github.com/repos/eShopWorld/sierra/commits{/sha}","git_commits_url":"https://api.github.com/repos/eShopWorld/sierra/git/commits{/sha}","comments_url":"https://api.github.com/repos/eShopWorld/sierra/comments{/number}","issue_comment_url":"https://api.github.com/repos/eShopWorld/sierra/issues/comments{/number}","contents_url":"https://api.github.com/repos/eShopWorld/sierra/contents/{+path}","compare_url":"https://api.github.com/repos/eShopWorld/sierra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eShopWorld/sierra/merges","archive_url":"https://api.github.com/repos/eShopWorld/sierra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eShopWorld/sierra/downloads","issues_url":"https://api.github.com/repos/eShopWorld/sierra/issues{/number}","pulls_url":"https://api.github.com/repos/eShopWorld/sierra/pulls{/number}","milestones_url":"https://api.github.com/repos/eShopWorld/sierra/milestones{/number}","notifications_url":"https://api.github.com/repos/eShopWorld/sierra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eShopWorld/sierra/labels{/name}","releases_url":"https://api.github.com/repos/eShopWorld/sierra/releases{/id}","deployments_url":"https://api.github.com/repos/eShopWorld/sierra/deployments","created_at":"2017-11-15T12:05:00Z","updated_at":"2018-10-18T11:25:27Z","pushed_at":"2018-10-22T08:36:37Z","git_url":"git://github.com/eShopWorld/sierra.git","ssh_url":"git@github.com:eShopWorld/sierra.git","clone_url":"https://github.com/eShopWorld/sierra.git","svn_url":"https://github.com/eShopWorld/sierra","homepage":null,"size":437,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"eShopWorld:master","ref":"master","sha":"5a0465854c81dffadb7d562b3ee29f0f74b3ddc3","user":{"login":"eShopWorld","id":20441918,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDQxOTE4","avatar_url":"https://avatars0.githubusercontent.com/u/20441918?v=4","gravatar_id":"","url":"https://api.github.com/users/eShopWorld","html_url":"https://github.com/eShopWorld","followers_url":"https://api.github.com/users/eShopWorld/followers","following_url":"https://api.github.com/users/eShopWorld/following{/other_user}","gists_url":"https://api.github.com/users/eShopWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/eShopWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eShopWorld/subscriptions","organizations_url":"https://api.github.com/users/eShopWorld/orgs","repos_url":"https://api.github.com/users/eShopWorld/repos","events_url":"https://api.github.com/users/eShopWorld/events{/privacy}","received_events_url":"https://api.github.com/users/eShopWorld/received_events","type":"Organization","site_admin":false},"repo":{"id":110828494,"node_id":"MDEwOlJlcG9zaXRvcnkxMTA4Mjg0OTQ=","name":"sierra","full_name":"eShopWorld/sierra","private":false,"owner":{"login":"eShopWorld","id":20441918,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNDQxOTE4","avatar_url":"https://avatars0.githubusercontent.com/u/20441918?v=4","gravatar_id":"","url":"https://api.github.com/users/eShopWorld","html_url":"https://github.com/eShopWorld","followers_url":"https://api.github.com/users/eShopWorld/followers","following_url":"https://api.github.com/users/eShopWorld/following{/other_user}","gists_url":"https://api.github.com/users/eShopWorld/gists{/gist_id}","starred_url":"https://api.github.com/users/eShopWorld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eShopWorld/subscriptions","organizations_url":"https://api.github.com/users/eShopWorld/orgs","repos_url":"https://api.github.com/users/eShopWorld/repos","events_url":"https://api.github.com/users/eShopWorld/events{/privacy}","received_events_url":"https://api.github.com/users/eShopWorld/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eShopWorld/sierra","description":"Tenant orchestration platform using ServiceFabric and VSTS CI/CD pipelines","fork":false,"url":"https://api.github.com/repos/eShopWorld/sierra","forks_url":"https://api.github.com/repos/eShopWorld/sierra/forks","keys_url":"https://api.github.com/repos/eShopWorld/sierra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eShopWorld/sierra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eShopWorld/sierra/teams","hooks_url":"https://api.github.com/repos/eShopWorld/sierra/hooks","issue_events_url":"https://api.github.com/repos/eShopWorld/sierra/issues/events{/number}","events_url":"https://api.github.com/repos/eShopWorld/sierra/events","assignees_url":"https://api.github.com/repos/eShopWorld/sierra/assignees{/user}","branches_url":"https://api.github.com/repos/eShopWorld/sierra/branches{/branch}","tags_url":"https://api.github.com/repos/eShopWorld/sierra/tags","blobs_url":"https://api.github.com/repos/eShopWorld/sierra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eShopWorld/sierra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eShopWorld/sierra/git/refs{/sha}","trees_url":"https://api.github.com/repos/eShopWorld/sierra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eShopWorld/sierra/statuses/{sha}","languages_url":"https://api.github.com/repos/eShopWorld/sierra/languages","stargazers_url":"https://api.github.com/repos/eShopWorld/sierra/stargazers","contributors_url":"https://api.github.com/repos/eShopWorld/sierra/contributors","subscribers_url":"https://api.github.com/repos/eShopWorld/sierra/subscribers","subscription_url":"https://api.github.com/repos/eShopWorld/sierra/subscription","commits_url":"https://api.github.com/repos/eShopWorld/sierra/commits{/sha}","git_commits_url":"https://api.github.com/repos/eShopWorld/sierra/git/commits{/sha}","comments_url":"https://api.github.com/repos/eShopWorld/sierra/comments{/number}","issue_comment_url":"https://api.github.com/repos/eShopWorld/sierra/issues/comments{/number}","contents_url":"https://api.github.com/repos/eShopWorld/sierra/contents/{+path}","compare_url":"https://api.github.com/repos/eShopWorld/sierra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eShopWorld/sierra/merges","archive_url":"https://api.github.com/repos/eShopWorld/sierra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eShopWorld/sierra/downloads","issues_url":"https://api.github.com/repos/eShopWorld/sierra/issues{/number}","pulls_url":"https://api.github.com/repos/eShopWorld/sierra/pulls{/number}","milestones_url":"https://api.github.com/repos/eShopWorld/sierra/milestones{/number}","notifications_url":"https://api.github.com/repos/eShopWorld/sierra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eShopWorld/sierra/labels{/name}","releases_url":"https://api.github.com/repos/eShopWorld/sierra/releases{/id}","deployments_url":"https://api.github.com/repos/eShopWorld/sierra/deployments","created_at":"2017-11-15T12:05:00Z","updated_at":"2018-10-18T11:25:27Z","pushed_at":"2018-10-22T08:36:37Z","git_url":"git://github.com/eShopWorld/sierra.git","ssh_url":"git@github.com:eShopWorld/sierra.git","clone_url":"https://github.com/eShopWorld/sierra.git","svn_url":"https://github.com/eShopWorld/sierra","homepage":null,"size":437,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eShopWorld/sierra/pulls/25"},"html":{"href":"https://github.com/eShopWorld/sierra/pull/25"},"issue":{"href":"https://api.github.com/repos/eShopWorld/sierra/issues/25"},"comments":{"href":"https://api.github.com/repos/eShopWorld/sierra/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/eShopWorld/sierra/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/eShopWorld/sierra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eShopWorld/sierra/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/eShopWorld/sierra/statuses/25f8a7e05296c6bf5035936c1130a74e83fbdcba"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"arturek"}}