{"action":"created","comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/comments/74331244","id":74331244,"diff_hunk":"@@ -0,0 +1,90 @@\n+﻿using System;\n+using Microsoft.AspNetCore.Builder;\n+using Microsoft.AspNetCore.Http;\n+using Microsoft.AspNetCore.Identity;\n+using Microsoft.AspNetCore.Routing;\n+using Microsoft.Extensions.DependencyInjection;\n+using Microsoft.Extensions.DependencyInjection.Extensions;\n+using Microsoft.Extensions.Options;\n+using Orchard.Environment.Shell;\n+using Orchard.Security;\n+using Orchard.OpenId.Indexes;\n+using Orchard.OpenId.Models;\n+using Orchard.Users.Models;\n+using Orchard.OpenId.Services;\n+using Orchard.FileSystem.AppData;\n+using Microsoft.Extensions.Logging;\n+using Orchard.Settings;\n+\n+namespace Orchard.OpenId\n+{\n+    public class Startup : StartupBase\n+    {     \n+        private readonly string _certificateFullPath;\n+        private const string certificateFileName = \"Certificate.pfx\";\n+        private readonly string tenant;\n+\n+        public Startup(ShellSettings shellSettings, IAppDataFolder appDataFolder, ILoggerFactory loggerFactory)   \n+        {\n+            tenant = shellSettings.Name;\n+            _certificateFullPath = appDataFolder.Combine(shellSettings.Name, certificateFileName);\n+        }\n+\n+        public override void Configure(IApplicationBuilder builder, IRouteBuilder routes, IServiceProvider serviceProvider)\n+        {\n+            var baseUrl = serviceProvider.GetRequiredService<ISiteService>().GetSiteSettingsAsync().Result.BaseUrl ?? tenant;\n+            builder.UseOpenIddict();","path":"src/Orchard.Web/Modules/Orchard.OpenId/Module.cs","position":36,"original_position":36,"commit_id":"3387028dc212e3c9fdda4a4b35a8c47d28be1e43","original_commit_id":"b82b07a4e7654ad7d0342d59d28ca8a54374fc06","user":{"login":"sebastienros","id":1165805,"avatar_url":"https://avatars.githubusercontent.com/u/1165805?v=3","gravatar_id":"","url":"https://api.github.com/users/sebastienros","html_url":"https://github.com/sebastienros","followers_url":"https://api.github.com/users/sebastienros/followers","following_url":"https://api.github.com/users/sebastienros/following{/other_user}","gists_url":"https://api.github.com/users/sebastienros/gists{/gist_id}","starred_url":"https://api.github.com/users/sebastienros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebastienros/subscriptions","organizations_url":"https://api.github.com/users/sebastienros/orgs","repos_url":"https://api.github.com/users/sebastienros/repos","events_url":"https://api.github.com/users/sebastienros/events{/privacy}","received_events_url":"https://api.github.com/users/sebastienros/received_events","type":"User","site_admin":false},"body":"Standard it is.","created_at":"2016-08-10T21:09:46Z","updated_at":"2016-08-10T21:09:46Z","html_url":"https://github.com/OrchardCMS/Orchard2/pull/215#discussion_r74331244","pull_request_url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215","_links":{"self":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/comments/74331244"},"html":{"href":"https://github.com/OrchardCMS/Orchard2/pull/215#discussion_r74331244"},"pull_request":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215"}}},"pull_request":{"url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215","id":80594948,"html_url":"https://github.com/OrchardCMS/Orchard2/pull/215","diff_url":"https://github.com/OrchardCMS/Orchard2/pull/215.diff","patch_url":"https://github.com/OrchardCMS/Orchard2/pull/215.patch","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard2/issues/215","number":215,"state":"open","locked":false,"title":"#210 Added OpenId module for OpenId/OAuth2 support","user":{"login":"jersiovic","id":4950766,"avatar_url":"https://avatars.githubusercontent.com/u/4950766?v=3","gravatar_id":"","url":"https://api.github.com/users/jersiovic","html_url":"https://github.com/jersiovic","followers_url":"https://api.github.com/users/jersiovic/followers","following_url":"https://api.github.com/users/jersiovic/following{/other_user}","gists_url":"https://api.github.com/users/jersiovic/gists{/gist_id}","starred_url":"https://api.github.com/users/jersiovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jersiovic/subscriptions","organizations_url":"https://api.github.com/users/jersiovic/orgs","repos_url":"https://api.github.com/users/jersiovic/repos","events_url":"https://api.github.com/users/jersiovic/events{/privacy}","received_events_url":"https://api.github.com/users/jersiovic/received_events","type":"User","site_admin":false},"body":"I decided to put everything related with OpenId/Oauth2 in a separate module. In order to do so I have removed dependencies adding UserId to OpenIdToken class in this new module instead of having a Tokens array in User class.\r\nThe feature still is not completed. I'm testing it using Postman following this post http://kevinchalet.com/2016/07/13/creating-your-own-openid-connect-server-with-asos-testing-your-authorization-server-with-postman/\r\nBy the moment I'm facing problems described here https://github.com/OrchardCMS/Orchard2/issues/210 .\r\nIt would be also interesting to add demo clients ","created_at":"2016-08-09T10:15:40Z","updated_at":"2016-08-10T21:09:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"366a7548cc729abfca67994173f4f92bd2c7aa91","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215/commits","review_comments_url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215/comments","review_comment_url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard2/issues/215/comments","statuses_url":"https://api.github.com/repos/OrchardCMS/Orchard2/statuses/3387028dc212e3c9fdda4a4b35a8c47d28be1e43","head":{"label":"xkproject:oauth2_xk","ref":"oauth2_xk","sha":"3387028dc212e3c9fdda4a4b35a8c47d28be1e43","user":{"login":"xkproject","id":17524989,"avatar_url":"https://avatars.githubusercontent.com/u/17524989?v=3","gravatar_id":"","url":"https://api.github.com/users/xkproject","html_url":"https://github.com/xkproject","followers_url":"https://api.github.com/users/xkproject/followers","following_url":"https://api.github.com/users/xkproject/following{/other_user}","gists_url":"https://api.github.com/users/xkproject/gists{/gist_id}","starred_url":"https://api.github.com/users/xkproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xkproject/subscriptions","organizations_url":"https://api.github.com/users/xkproject/orgs","repos_url":"https://api.github.com/users/xkproject/repos","events_url":"https://api.github.com/users/xkproject/events{/privacy}","received_events_url":"https://api.github.com/users/xkproject/received_events","type":"Organization","site_admin":false},"repo":{"id":62698364,"name":"Orchard2","full_name":"xkproject/Orchard2","owner":{"login":"xkproject","id":17524989,"avatar_url":"https://avatars.githubusercontent.com/u/17524989?v=3","gravatar_id":"","url":"https://api.github.com/users/xkproject","html_url":"https://github.com/xkproject","followers_url":"https://api.github.com/users/xkproject/followers","following_url":"https://api.github.com/users/xkproject/following{/other_user}","gists_url":"https://api.github.com/users/xkproject/gists{/gist_id}","starred_url":"https://api.github.com/users/xkproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xkproject/subscriptions","organizations_url":"https://api.github.com/users/xkproject/orgs","repos_url":"https://api.github.com/users/xkproject/repos","events_url":"https://api.github.com/users/xkproject/events{/privacy}","received_events_url":"https://api.github.com/users/xkproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xkproject/Orchard2","description":"Orchard vNext","fork":true,"url":"https://api.github.com/repos/xkproject/Orchard2","forks_url":"https://api.github.com/repos/xkproject/Orchard2/forks","keys_url":"https://api.github.com/repos/xkproject/Orchard2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xkproject/Orchard2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xkproject/Orchard2/teams","hooks_url":"https://api.github.com/repos/xkproject/Orchard2/hooks","issue_events_url":"https://api.github.com/repos/xkproject/Orchard2/issues/events{/number}","events_url":"https://api.github.com/repos/xkproject/Orchard2/events","assignees_url":"https://api.github.com/repos/xkproject/Orchard2/assignees{/user}","branches_url":"https://api.github.com/repos/xkproject/Orchard2/branches{/branch}","tags_url":"https://api.github.com/repos/xkproject/Orchard2/tags","blobs_url":"https://api.github.com/repos/xkproject/Orchard2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xkproject/Orchard2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xkproject/Orchard2/git/refs{/sha}","trees_url":"https://api.github.com/repos/xkproject/Orchard2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xkproject/Orchard2/statuses/{sha}","languages_url":"https://api.github.com/repos/xkproject/Orchard2/languages","stargazers_url":"https://api.github.com/repos/xkproject/Orchard2/stargazers","contributors_url":"https://api.github.com/repos/xkproject/Orchard2/contributors","subscribers_url":"https://api.github.com/repos/xkproject/Orchard2/subscribers","subscription_url":"https://api.github.com/repos/xkproject/Orchard2/subscription","commits_url":"https://api.github.com/repos/xkproject/Orchard2/commits{/sha}","git_commits_url":"https://api.github.com/repos/xkproject/Orchard2/git/commits{/sha}","comments_url":"https://api.github.com/repos/xkproject/Orchard2/comments{/number}","issue_comment_url":"https://api.github.com/repos/xkproject/Orchard2/issues/comments{/number}","contents_url":"https://api.github.com/repos/xkproject/Orchard2/contents/{+path}","compare_url":"https://api.github.com/repos/xkproject/Orchard2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xkproject/Orchard2/merges","archive_url":"https://api.github.com/repos/xkproject/Orchard2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xkproject/Orchard2/downloads","issues_url":"https://api.github.com/repos/xkproject/Orchard2/issues{/number}","pulls_url":"https://api.github.com/repos/xkproject/Orchard2/pulls{/number}","milestones_url":"https://api.github.com/repos/xkproject/Orchard2/milestones{/number}","notifications_url":"https://api.github.com/repos/xkproject/Orchard2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xkproject/Orchard2/labels{/name}","releases_url":"https://api.github.com/repos/xkproject/Orchard2/releases{/id}","deployments_url":"https://api.github.com/repos/xkproject/Orchard2/deployments","created_at":"2016-07-06T06:54:25Z","updated_at":"2016-07-06T06:54:27Z","pushed_at":"2016-08-10T12:54:30Z","git_url":"git://github.com/xkproject/Orchard2.git","ssh_url":"git@github.com:xkproject/Orchard2.git","clone_url":"https://github.com/xkproject/Orchard2.git","svn_url":"https://github.com/xkproject/Orchard2","homepage":null,"size":3432,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OrchardCMS:oauth2","ref":"oauth2","sha":"820f8f2d9940a0ad8f925a4f11534ec5a277faa6","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":26884725,"name":"Orchard2","full_name":"OrchardCMS/Orchard2","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/Orchard2","description":"Orchard vNext","fork":false,"url":"https://api.github.com/repos/OrchardCMS/Orchard2","forks_url":"https://api.github.com/repos/OrchardCMS/Orchard2/forks","keys_url":"https://api.github.com/repos/OrchardCMS/Orchard2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrchardCMS/Orchard2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrchardCMS/Orchard2/teams","hooks_url":"https://api.github.com/repos/OrchardCMS/Orchard2/hooks","issue_events_url":"https://api.github.com/repos/OrchardCMS/Orchard2/issues/events{/number}","events_url":"https://api.github.com/repos/OrchardCMS/Orchard2/events","assignees_url":"https://api.github.com/repos/OrchardCMS/Orchard2/assignees{/user}","branches_url":"https://api.github.com/repos/OrchardCMS/Orchard2/branches{/branch}","tags_url":"https://api.github.com/repos/OrchardCMS/Orchard2/tags","blobs_url":"https://api.github.com/repos/OrchardCMS/Orchard2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrchardCMS/Orchard2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrchardCMS/Orchard2/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrchardCMS/Orchard2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrchardCMS/Orchard2/statuses/{sha}","languages_url":"https://api.github.com/repos/OrchardCMS/Orchard2/languages","stargazers_url":"https://api.github.com/repos/OrchardCMS/Orchard2/stargazers","contributors_url":"https://api.github.com/repos/OrchardCMS/Orchard2/contributors","subscribers_url":"https://api.github.com/repos/OrchardCMS/Orchard2/subscribers","subscription_url":"https://api.github.com/repos/OrchardCMS/Orchard2/subscription","commits_url":"https://api.github.com/repos/OrchardCMS/Orchard2/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrchardCMS/Orchard2/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard2/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrchardCMS/Orchard2/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrchardCMS/Orchard2/contents/{+path}","compare_url":"https://api.github.com/repos/OrchardCMS/Orchard2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrchardCMS/Orchard2/merges","archive_url":"https://api.github.com/repos/OrchardCMS/Orchard2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrchardCMS/Orchard2/downloads","issues_url":"https://api.github.com/repos/OrchardCMS/Orchard2/issues{/number}","pulls_url":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls{/number}","milestones_url":"https://api.github.com/repos/OrchardCMS/Orchard2/milestones{/number}","notifications_url":"https://api.github.com/repos/OrchardCMS/Orchard2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard2/labels{/name}","releases_url":"https://api.github.com/repos/OrchardCMS/Orchard2/releases{/id}","deployments_url":"https://api.github.com/repos/OrchardCMS/Orchard2/deployments","created_at":"2014-11-19T22:29:26Z","updated_at":"2016-08-10T20:10:49Z","pushed_at":"2016-08-10T17:30:41Z","git_url":"git://github.com/OrchardCMS/Orchard2.git","ssh_url":"git@github.com:OrchardCMS/Orchard2.git","clone_url":"https://github.com/OrchardCMS/Orchard2.git","svn_url":"https://github.com/OrchardCMS/Orchard2","homepage":null,"size":4682,"stargazers_count":437,"watchers_count":437,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":182,"mirror_url":null,"open_issues_count":44,"forks":182,"open_issues":44,"watchers":437,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215"},"html":{"href":"https://github.com/OrchardCMS/Orchard2/pull/215"},"issue":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/issues/215"},"comments":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/issues/215/comments"},"review_comments":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215/comments"},"review_comment":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/pulls/215/commits"},"statuses":{"href":"https://api.github.com/repos/OrchardCMS/Orchard2/statuses/3387028dc212e3c9fdda4a4b35a8c47d28be1e43"}}}}
{"actor":{"display_login":"sebastienros"}}