{"action":"created","comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/comments/93817113","pull_request_review_id":14353476,"id":93817113,"diff_hunk":"@@ -1,39 +1,51 @@\n ﻿using System;\n using System.Collections.Concurrent;\n-using System.Collections.Generic;\n-using System.Linq;\n using Microsoft.IdentityModel.Clients.ActiveDirectory;\n+using Orchard.Environment.Extensions;\n \n-namespace Orchard.OpenId {\n-    public class InMemoryCache : TokenCache {\n-        private const string CacheIdSuffix = \"_TokenCache\";\n-        private static ConcurrentDictionary<string, byte[]> _inMemoryTokenCache;\n-\n-        private string _userObjectId;\n-        private string _cacheId;\n-\n-        public InMemoryCache(string userId) {\n-            _userObjectId = userId;\n-            _cacheId = String.Concat(_userObjectId, CacheIdSuffix);\n-\n-            if (_inMemoryTokenCache == null)\n-                _inMemoryTokenCache = new ConcurrentDictionary<string, byte[]>();\n+namespace Orchard.OpenId.Services.AzureActiveDirectory {\n+    [OrchardFeature(\"Orchard.OpenId.AzureActiveDirectory\")]\n+    public class InMemoryCache : TokenCache, ISingletonDependency {\n+        public InMemoryCache() {\n+            // On tenant start clear cache.\n+            Clear();","path":"src/Orchard.Web/Modules/Orchard.OpenId/Services/AzureActiveDirectory/InMemoryCache.cs","position":11,"original_position":27,"commit_id":"e5c747b74e5c90194e8d54f119552103e90cebc4","original_commit_id":"e5c747b74e5c90194e8d54f119552103e90cebc4","user":{"login":"ThaerAlAjlouni","id":22820843,"avatar_url":"https://avatars.githubusercontent.com/u/22820843?v=3","gravatar_id":"","url":"https://api.github.com/users/ThaerAlAjlouni","html_url":"https://github.com/ThaerAlAjlouni","followers_url":"https://api.github.com/users/ThaerAlAjlouni/followers","following_url":"https://api.github.com/users/ThaerAlAjlouni/following{/other_user}","gists_url":"https://api.github.com/users/ThaerAlAjlouni/gists{/gist_id}","starred_url":"https://api.github.com/users/ThaerAlAjlouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThaerAlAjlouni/subscriptions","organizations_url":"https://api.github.com/users/ThaerAlAjlouni/orgs","repos_url":"https://api.github.com/users/ThaerAlAjlouni/repos","events_url":"https://api.github.com/users/ThaerAlAjlouni/events{/privacy}","received_events_url":"https://api.github.com/users/ThaerAlAjlouni/received_events","type":"User","site_admin":false},"body":"This was an extra step, it is redundant so I will remove it","created_at":"2016-12-24T13:20:11Z","updated_at":"2016-12-24T13:20:11Z","html_url":"https://github.com/OrchardCMS/Orchard/pull/7420#discussion_r93817113","pull_request_url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420","_links":{"self":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/comments/93817113"},"html":{"href":"https://github.com/OrchardCMS/Orchard/pull/7420#discussion_r93817113"},"pull_request":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420"}}},"pull_request":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420","id":94553082,"html_url":"https://github.com/OrchardCMS/Orchard/pull/7420","diff_url":"https://github.com/OrchardCMS/Orchard/pull/7420.diff","patch_url":"https://github.com/OrchardCMS/Orchard/pull/7420.patch","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7420","number":7420,"state":"open","locked":false,"title":"Feature/openid","user":{"login":"ThaerAlAjlouni","id":22820843,"avatar_url":"https://avatars.githubusercontent.com/u/22820843?v=3","gravatar_id":"","url":"https://api.github.com/users/ThaerAlAjlouni","html_url":"https://github.com/ThaerAlAjlouni","followers_url":"https://api.github.com/users/ThaerAlAjlouni/followers","following_url":"https://api.github.com/users/ThaerAlAjlouni/following{/other_user}","gists_url":"https://api.github.com/users/ThaerAlAjlouni/gists{/gist_id}","starred_url":"https://api.github.com/users/ThaerAlAjlouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThaerAlAjlouni/subscriptions","organizations_url":"https://api.github.com/users/ThaerAlAjlouni/orgs","repos_url":"https://api.github.com/users/ThaerAlAjlouni/repos","events_url":"https://api.github.com/users/ThaerAlAjlouni/events{/privacy}","received_events_url":"https://api.github.com/users/ThaerAlAjlouni/received_events","type":"User","site_admin":false},"body":"This PR adds OpenId to Orchard. See #7419","created_at":"2016-11-21T04:32:12Z","updated_at":"2016-12-24T13:20:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52609a44b863658accdd86cb94c83cec4a9af890","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420/commits","review_comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420/comments","review_comment_url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7420/comments","statuses_url":"https://api.github.com/repos/OrchardCMS/Orchard/statuses/e5c747b74e5c90194e8d54f119552103e90cebc4","head":{"label":"ThaerAlAjlouni:feature/openid","ref":"feature/openid","sha":"e5c747b74e5c90194e8d54f119552103e90cebc4","user":{"login":"ThaerAlAjlouni","id":22820843,"avatar_url":"https://avatars.githubusercontent.com/u/22820843?v=3","gravatar_id":"","url":"https://api.github.com/users/ThaerAlAjlouni","html_url":"https://github.com/ThaerAlAjlouni","followers_url":"https://api.github.com/users/ThaerAlAjlouni/followers","following_url":"https://api.github.com/users/ThaerAlAjlouni/following{/other_user}","gists_url":"https://api.github.com/users/ThaerAlAjlouni/gists{/gist_id}","starred_url":"https://api.github.com/users/ThaerAlAjlouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThaerAlAjlouni/subscriptions","organizations_url":"https://api.github.com/users/ThaerAlAjlouni/orgs","repos_url":"https://api.github.com/users/ThaerAlAjlouni/repos","events_url":"https://api.github.com/users/ThaerAlAjlouni/events{/privacy}","received_events_url":"https://api.github.com/users/ThaerAlAjlouni/received_events","type":"User","site_admin":false},"repo":{"id":70826738,"name":"Orchard","full_name":"ThaerAlAjlouni/Orchard","owner":{"login":"ThaerAlAjlouni","id":22820843,"avatar_url":"https://avatars.githubusercontent.com/u/22820843?v=3","gravatar_id":"","url":"https://api.github.com/users/ThaerAlAjlouni","html_url":"https://github.com/ThaerAlAjlouni","followers_url":"https://api.github.com/users/ThaerAlAjlouni/followers","following_url":"https://api.github.com/users/ThaerAlAjlouni/following{/other_user}","gists_url":"https://api.github.com/users/ThaerAlAjlouni/gists{/gist_id}","starred_url":"https://api.github.com/users/ThaerAlAjlouni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThaerAlAjlouni/subscriptions","organizations_url":"https://api.github.com/users/ThaerAlAjlouni/orgs","repos_url":"https://api.github.com/users/ThaerAlAjlouni/repos","events_url":"https://api.github.com/users/ThaerAlAjlouni/events{/privacy}","received_events_url":"https://api.github.com/users/ThaerAlAjlouni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThaerAlAjlouni/Orchard","description":"Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.","fork":true,"url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard","forks_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/forks","keys_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/teams","hooks_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/hooks","issue_events_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/issues/events{/number}","events_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/events","assignees_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/assignees{/user}","branches_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/branches{/branch}","tags_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/tags","blobs_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/statuses/{sha}","languages_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/languages","stargazers_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/stargazers","contributors_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/contributors","subscribers_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/subscribers","subscription_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/subscription","commits_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/contents/{+path}","compare_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/merges","archive_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/downloads","issues_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/issues{/number}","pulls_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/pulls{/number}","milestones_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/milestones{/number}","notifications_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/labels{/name}","releases_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/releases{/id}","deployments_url":"https://api.github.com/repos/ThaerAlAjlouni/Orchard/deployments","created_at":"2016-10-13T16:36:22Z","updated_at":"2016-10-13T16:36:34Z","pushed_at":"2016-12-16T15:15:09Z","git_url":"git://github.com/ThaerAlAjlouni/Orchard.git","ssh_url":"git@github.com:ThaerAlAjlouni/Orchard.git","clone_url":"https://github.com/ThaerAlAjlouni/Orchard.git","svn_url":"https://github.com/ThaerAlAjlouni/Orchard","homepage":"http://orchardproject.net","size":187318,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"OrchardCMS:dev","ref":"dev","sha":"9d71a627da3621cbeff16bdcad7164ca2ffec370","user":{"login":"OrchardCMS","id":1159247,"avatar_url":"https://avatars.githubusercontent.com/u/1159247?v=3","gravatar_id":"","url":"https://api.github.com/users/OrchardCMS","html_url":"https://github.com/OrchardCMS","followers_url":"https://api.github.com/users/OrchardCMS/followers","following_url":"https://api.github.com/users/OrchardCMS/following{/other_user}","gists_url":"https://api.github.com/users/OrchardCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/OrchardCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrchardCMS/subscriptions","organizations_url":"https://api.github.com/users/OrchardCMS/orgs","repos_url":"https://api.github.com/users/OrchardCMS/repos","events_url":"https://api.github.com/users/OrchardCMS/events{/privacy}","received_events_url":"https://api.github.com/users/OrchardCMS/received_events","type":"Organization","site_admin":false},"repo":{"id":33889464,"name":"Orchard","full_name":"OrchardCMS/Orchard","owner":{"login":"OrchardCMS","id":1159247,"avatar_url":"https://avatars.githubusercontent.com/u/1159247?v=3","gravatar_id":"","url":"https://api.github.com/users/OrchardCMS","html_url":"https://github.com/OrchardCMS","followers_url":"https://api.github.com/users/OrchardCMS/followers","following_url":"https://api.github.com/users/OrchardCMS/following{/other_user}","gists_url":"https://api.github.com/users/OrchardCMS/gists{/gist_id}","starred_url":"https://api.github.com/users/OrchardCMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrchardCMS/subscriptions","organizations_url":"https://api.github.com/users/OrchardCMS/orgs","repos_url":"https://api.github.com/users/OrchardCMS/repos","events_url":"https://api.github.com/users/OrchardCMS/events{/privacy}","received_events_url":"https://api.github.com/users/OrchardCMS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OrchardCMS/Orchard","description":"Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.","fork":false,"url":"https://api.github.com/repos/OrchardCMS/Orchard","forks_url":"https://api.github.com/repos/OrchardCMS/Orchard/forks","keys_url":"https://api.github.com/repos/OrchardCMS/Orchard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrchardCMS/Orchard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrchardCMS/Orchard/teams","hooks_url":"https://api.github.com/repos/OrchardCMS/Orchard/hooks","issue_events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/events{/number}","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/events","assignees_url":"https://api.github.com/repos/OrchardCMS/Orchard/assignees{/user}","branches_url":"https://api.github.com/repos/OrchardCMS/Orchard/branches{/branch}","tags_url":"https://api.github.com/repos/OrchardCMS/Orchard/tags","blobs_url":"https://api.github.com/repos/OrchardCMS/Orchard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrchardCMS/Orchard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrchardCMS/Orchard/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrchardCMS/Orchard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrchardCMS/Orchard/statuses/{sha}","languages_url":"https://api.github.com/repos/OrchardCMS/Orchard/languages","stargazers_url":"https://api.github.com/repos/OrchardCMS/Orchard/stargazers","contributors_url":"https://api.github.com/repos/OrchardCMS/Orchard/contributors","subscribers_url":"https://api.github.com/repos/OrchardCMS/Orchard/subscribers","subscription_url":"https://api.github.com/repos/OrchardCMS/Orchard/subscription","commits_url":"https://api.github.com/repos/OrchardCMS/Orchard/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrchardCMS/Orchard/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrchardCMS/Orchard/contents/{+path}","compare_url":"https://api.github.com/repos/OrchardCMS/Orchard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrchardCMS/Orchard/merges","archive_url":"https://api.github.com/repos/OrchardCMS/Orchard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrchardCMS/Orchard/downloads","issues_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues{/number}","pulls_url":"https://api.github.com/repos/OrchardCMS/Orchard/pulls{/number}","milestones_url":"https://api.github.com/repos/OrchardCMS/Orchard/milestones{/number}","notifications_url":"https://api.github.com/repos/OrchardCMS/Orchard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/labels{/name}","releases_url":"https://api.github.com/repos/OrchardCMS/Orchard/releases{/id}","deployments_url":"https://api.github.com/repos/OrchardCMS/Orchard/deployments","created_at":"2015-04-13T19:35:52Z","updated_at":"2016-12-24T11:40:16Z","pushed_at":"2016-12-22T20:22:16Z","git_url":"git://github.com/OrchardCMS/Orchard.git","ssh_url":"git@github.com:OrchardCMS/Orchard.git","clone_url":"https://github.com/OrchardCMS/Orchard.git","svn_url":"https://github.com/OrchardCMS/Orchard","homepage":"http://orchardproject.net","size":188700,"stargazers_count":1173,"watchers_count":1173,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":792,"mirror_url":null,"open_issues_count":1801,"forks":792,"open_issues":1801,"watchers":1173,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420"},"html":{"href":"https://github.com/OrchardCMS/Orchard/pull/7420"},"issue":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7420"},"comments":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/issues/7420/comments"},"review_comments":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420/comments"},"review_comment":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/pulls/7420/commits"},"statuses":{"href":"https://api.github.com/repos/OrchardCMS/Orchard/statuses/e5c747b74e5c90194e8d54f119552103e90cebc4"}}}}
{"actor":{"display_login":"ThaerAlAjlouni"}}