{"action":"created","comment":{"url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/comments/91670168","pull_request_review_id":12180349,"id":91670168,"diff_hunk":"@@ -66,10 +65,7 @@ public MAuthAuthenticator(MAuthOptionsBase options)\n                     ApplicationUuid = options.ApplicationUuid,\n                     PrivateKey = options.PrivateKey\n                 },\n-                innerHandler: options.MAuthServerHandler ?? new WebRequestHandler()\n-                {\n-                    CachePolicy = new RequestCachePolicy(RequestCacheLevel.Default)\n-                }\n+                innerHandler: options.MAuthServerHandler ?? new  HttpClientHandler()","path":"src/Medidata.MAuth.Core/MAuthAuthenticator.cs","position":14,"original_position":14,"commit_id":"6f43a38fbb3c502bb0dfde19b4effff0e246dc65","original_commit_id":"6f43a38fbb3c502bb0dfde19b4effff0e246dc65","user":{"login":"hkurniawan-mdsol","id":21052449,"avatar_url":"https://avatars.githubusercontent.com/u/21052449?v=3","gravatar_id":"","url":"https://api.github.com/users/hkurniawan-mdsol","html_url":"https://github.com/hkurniawan-mdsol","followers_url":"https://api.github.com/users/hkurniawan-mdsol/followers","following_url":"https://api.github.com/users/hkurniawan-mdsol/following{/other_user}","gists_url":"https://api.github.com/users/hkurniawan-mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/hkurniawan-mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkurniawan-mdsol/subscriptions","organizations_url":"https://api.github.com/users/hkurniawan-mdsol/orgs","repos_url":"https://api.github.com/users/hkurniawan-mdsol/repos","events_url":"https://api.github.com/users/hkurniawan-mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/hkurniawan-mdsol/received_events","type":"User","site_admin":false},"body":"I can't find any reference to `CachePolicy` in .net core.  Maybe this will come in with netstandard2.0.\r\nFor now we can do something like this\r\n```cs\r\n  innerHandler: options.MAuthServerHandler ??\r\n#if NETSTANDARD1_4\r\n  new HttpClientHandler()\r\n#else\r\n  new WebRequestHandler()\r\n  {\r\n    CachePolicy = new RequestCachePolicy(RequestCacheLevel.Default)\r\n  }\r\n#endif\r\n```","created_at":"2016-12-09T07:34:06Z","updated_at":"2016-12-09T07:34:06Z","html_url":"https://github.com/mdsol/mauth-client-dotnet/pull/5#discussion_r91670168","pull_request_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/comments/91670168"},"html":{"href":"https://github.com/mdsol/mauth-client-dotnet/pull/5#discussion_r91670168"},"pull_request":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5","id":93701235,"html_url":"https://github.com/mdsol/mauth-client-dotnet/pull/5","diff_url":"https://github.com/mdsol/mauth-client-dotnet/pull/5.diff","patch_url":"https://github.com/mdsol/mauth-client-dotnet/pull/5.patch","issue_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/5","number":5,"state":"open","locked":false,"title":"[MCC-260222] Support .NET Standard 1.4 (.NET Core 1.0)","user":{"login":"hkurniawan-mdsol","id":21052449,"avatar_url":"https://avatars.githubusercontent.com/u/21052449?v=3","gravatar_id":"","url":"https://api.github.com/users/hkurniawan-mdsol","html_url":"https://github.com/hkurniawan-mdsol","followers_url":"https://api.github.com/users/hkurniawan-mdsol/followers","following_url":"https://api.github.com/users/hkurniawan-mdsol/following{/other_user}","gists_url":"https://api.github.com/users/hkurniawan-mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/hkurniawan-mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkurniawan-mdsol/subscriptions","organizations_url":"https://api.github.com/users/hkurniawan-mdsol/orgs","repos_url":"https://api.github.com/users/hkurniawan-mdsol/repos","events_url":"https://api.github.com/users/hkurniawan-mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/hkurniawan-mdsol/received_events","type":"User","site_admin":false},"body":"I managed to convert Medidata.MAuth.Core without major issues and I'd like to share my findings on what changes and current hurdles.\r\n\r\n### Code/Api change\r\n- Replace BouncyCastle 1.8.1 with CoreCompat.BouncyCastle 1.8.1-beta003. \r\nhttps://www.nuget.org/packages/CoreCompat.BouncyCastle/1.8.1-beta003\r\n- [ExcludeFromCodeCoverage] attribute has to be removed since it does not exist in current netstandard 1.6 yet. It will come in netstandard 2.0.\r\n- Replace Assembly.GetExecutingAssembly() with typeof(TestExtensions).GetTypeInfo().Assembly. \r\nThis also might be added in netstandard 2.0. \r\n\r\n### Tooling issues\r\nThere are however issues referencing .net core project from full .net and vice versa.\r\nBelow is the new project structure to give a better picture on what the issues are.\r\n```\r\nMedidata.MAuth.Core (.net core project)\r\n  |- Medidata.MAuth.Owin (full .net project)\r\n  |- Medidata.MAuth.WebApi (full .net project)\r\n\r\nMedidata.MAuth.Tests (.net core project)\r\n  |- MAuthAuthenticatorTests.cs (testing Medidata.MAuth.Core)\r\n  |- MAuthOwinTests.cs (testing Medidata.MAuth.Owin)\r\n  |- MAuthWebApiTests.cs (testing Medidata.MAuth.WebApi)\r\n  |- TestData.cs (shared by all classes above)\r\n```\r\n- Medidata.MAuth.Owin and Medidata.MAuth.WebApi are full .net framework projects however, they need to reference Medidata.MAuth.Core which is a .net core project.\r\nThis is doable by specifying that you want to target multiple frameworks in the Medidata.MAuth.Core project.json. The problem is, with the current tooling, to reference the Medidata.MAuth.Core library, it needs to be a nuget package. I created a pack.bat file which will create Medidata.MAuth.Core nupkg and put it in /project root/local_nuget folder.\r\n- With test, the issue is the reverse. MAuthOwinTests.cs which is in .net core project needs to reference Medidata.Mauth.Owin which is a full .net.\r\nThis is also doable by modifying Medidata.MAuth.Tests project.json however, I couldn't get it to compile.\r\nThe experience will be better in the next tooling release.\r\nTo temporarily solve this, I can try extract out MAuthOwinTests.cs into it's own full .net project however, it uses TestData class which are shared.\r\n\r\nWith the changes and the issues above, I'd like to ask your guys opinion.\r\n- Is it okay to proceed with beta version of BouncyCastle? All tests do pass though.\r\n- Is it okay to have Medidata.MAuth.Core library referenced as a nuget package by Owin and WebApi project? What will be the implications of this?\r\n- Is it okay to have a separate test project for MAuthOwinTests and MAuthWebApi tests?\r\n\r\nProject referencing issues will likely to be fixed in the next tooling release which will be in Spring 2017.\r\nhttps://github.com/dotnet/core/blob/master/roadmap.md\r\n\r\nLet me know what you guys think.\r\n@mdsol/team-51 \r\n\r\nFor information on .NET standard and .NET core\r\n[Introducing .Net Standard](https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/)","created_at":"2016-11-15T04:56:36Z","updated_at":"2016-12-09T07:34:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"701cf299a8c48404cb6ab1846b7df9794e6ff968","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5/commits","review_comments_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5/comments","review_comment_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/5/comments","statuses_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/statuses/6f43a38fbb3c502bb0dfde19b4effff0e246dc65","head":{"label":"mdsol:feature/dotnetcore","ref":"feature/dotnetcore","sha":"6f43a38fbb3c502bb0dfde19b4effff0e246dc65","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":64276970,"name":"mauth-client-dotnet","full_name":"mdsol/mauth-client-dotnet","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/mauth-client-dotnet","description":"Medidata.MAuth is a framework that provides support for authenticating web services and applications with the Medidata HMAC protocol, MAuth.","fork":false,"url":"https://api.github.com/repos/mdsol/mauth-client-dotnet","forks_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/forks","keys_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/teams","hooks_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/hooks","issue_events_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/events","assignees_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/tags","blobs_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/languages","stargazers_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/stargazers","contributors_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/contributors","subscribers_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/subscribers","subscription_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/subscription","commits_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/merges","archive_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/downloads","issues_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/deployments","created_at":"2016-07-27T04:26:26Z","updated_at":"2016-10-25T14:19:13Z","pushed_at":"2016-11-29T02:00:58Z","git_url":"git://github.com/mdsol/mauth-client-dotnet.git","ssh_url":"git@github.com:mdsol/mauth-client-dotnet.git","clone_url":"https://github.com/mdsol/mauth-client-dotnet.git","svn_url":"https://github.com/mdsol/mauth-client-dotnet","homepage":"","size":67,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"mdsol:develop","ref":"develop","sha":"a981f056c337f508e5eaf2e87e23c2b86628a54c","user":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"repo":{"id":64276970,"name":"mauth-client-dotnet","full_name":"mdsol/mauth-client-dotnet","owner":{"login":"mdsol","id":171103,"avatar_url":"https://avatars.githubusercontent.com/u/171103?v=3","gravatar_id":"","url":"https://api.github.com/users/mdsol","html_url":"https://github.com/mdsol","followers_url":"https://api.github.com/users/mdsol/followers","following_url":"https://api.github.com/users/mdsol/following{/other_user}","gists_url":"https://api.github.com/users/mdsol/gists{/gist_id}","starred_url":"https://api.github.com/users/mdsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdsol/subscriptions","organizations_url":"https://api.github.com/users/mdsol/orgs","repos_url":"https://api.github.com/users/mdsol/repos","events_url":"https://api.github.com/users/mdsol/events{/privacy}","received_events_url":"https://api.github.com/users/mdsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mdsol/mauth-client-dotnet","description":"Medidata.MAuth is a framework that provides support for authenticating web services and applications with the Medidata HMAC protocol, MAuth.","fork":false,"url":"https://api.github.com/repos/mdsol/mauth-client-dotnet","forks_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/forks","keys_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/teams","hooks_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/hooks","issue_events_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/events","assignees_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/tags","blobs_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/languages","stargazers_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/stargazers","contributors_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/contributors","subscribers_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/subscribers","subscription_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/subscription","commits_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/merges","archive_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/downloads","issues_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/releases{/id}","deployments_url":"https://api.github.com/repos/mdsol/mauth-client-dotnet/deployments","created_at":"2016-07-27T04:26:26Z","updated_at":"2016-10-25T14:19:13Z","pushed_at":"2016-11-29T02:00:58Z","git_url":"git://github.com/mdsol/mauth-client-dotnet.git","ssh_url":"git@github.com:mdsol/mauth-client-dotnet.git","clone_url":"https://github.com/mdsol/mauth-client-dotnet.git","svn_url":"https://github.com/mdsol/mauth-client-dotnet","homepage":"","size":67,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5"},"html":{"href":"https://github.com/mdsol/mauth-client-dotnet/pull/5"},"issue":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/5"},"comments":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/mdsol/mauth-client-dotnet/statuses/6f43a38fbb3c502bb0dfde19b4effff0e246dc65"}}}}
{"actor":{"display_login":"hkurniawan-mdsol"}}