{"action":"created","comment":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/comments/48921865","id":48921865,"diff_hunk":"@@ -27,69 +27,79 @@\n \n using System;\n using System.Security.Cryptography;\n+using Microsoft.IdentityModel.Logging;\n \n namespace Microsoft.IdentityModel.Tokens\n {\n     public class RsaSecurityKey : AsymmetricSecurityKey\n     {\n-        private RSAParameters _rsaParamaeters;\n-\n         public RsaSecurityKey(RSAParameters rsaParameters)\n         {\n             // must have private or public key\n-            bool hasPrivateKey = rsaParameters.D != null && rsaParameters.DP != null && rsaParameters.DQ != null && rsaParameters.P != null && rsaParameters.Q != null;\n-            bool hasPublicKey = rsaParameters.Exponent != null && rsaParameters.Modulus != null;\n-            if (!hasPrivateKey && !hasPublicKey)\n+            HasPrivateKey = rsaParameters.D != null && rsaParameters.DP != null && rsaParameters.DQ != null && rsaParameters.P != null && rsaParameters.Q != null;\n+            HasPublicKey = rsaParameters.Exponent != null && rsaParameters.Modulus != null;\n+            if (!HasPrivateKey && !HasPublicKey)\n             {\n-                throw new ArgumentException(\"no public or private key material found\");\n+                throw LogHelper.LogException<ArgumentException>(\"No public or private key material found\");\n             }\n \n-            _rsaParamaeters = rsaParameters;\n+            Parameters = rsaParameters;\n         }\n \n-        public override int KeySize\n+        public RsaSecurityKey(RSA rsa)","path":"src/Microsoft.IdentityModel.Tokens/RsaSecurityKey.cs","position":31,"original_position":31,"commit_id":"b86ad30dcd8f2ea868e8943943488168ec3420c8","original_commit_id":"b86ad30dcd8f2ea868e8943943488168ec3420c8","user":{"login":"PinpointTownes","id":6998306,"avatar_url":"https://avatars.githubusercontent.com/u/6998306?v=3","gravatar_id":"","url":"https://api.github.com/users/PinpointTownes","html_url":"https://github.com/PinpointTownes","followers_url":"https://api.github.com/users/PinpointTownes/followers","following_url":"https://api.github.com/users/PinpointTownes/following{/other_user}","gists_url":"https://api.github.com/users/PinpointTownes/gists{/gist_id}","starred_url":"https://api.github.com/users/PinpointTownes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PinpointTownes/subscriptions","organizations_url":"https://api.github.com/users/PinpointTownes/orgs","repos_url":"https://api.github.com/users/PinpointTownes/repos","events_url":"https://api.github.com/users/PinpointTownes/events{/privacy}","received_events_url":"https://api.github.com/users/PinpointTownes/received_events","type":"User","site_admin":false},"body":"Nothing, which sucks, terribly.\r\nIf you really want to keep the `RsaParameters` property for conveniency, it might be better to make a simple wrapper calling `Rsa.ExportParameters`.","created_at":"2016-01-06T02:25:05Z","updated_at":"2016-01-06T02:25:05Z","html_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/334#discussion_r48921865","pull_request_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334","_links":{"self":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/comments/48921865"},"html":{"href":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/334#discussion_r48921865"},"pull_request":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334"}}},"pull_request":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334","id":54414927,"html_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/334","diff_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/334.diff","patch_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/334.patch","issue_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/334","number":334,"state":"open","locked":false,"title":"Rc2 fixes","user":{"login":"tushargupta51","id":803796,"avatar_url":"https://avatars.githubusercontent.com/u/803796?v=3","gravatar_id":"","url":"https://api.github.com/users/tushargupta51","html_url":"https://github.com/tushargupta51","followers_url":"https://api.github.com/users/tushargupta51/followers","following_url":"https://api.github.com/users/tushargupta51/following{/other_user}","gists_url":"https://api.github.com/users/tushargupta51/gists{/gist_id}","starred_url":"https://api.github.com/users/tushargupta51/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tushargupta51/subscriptions","organizations_url":"https://api.github.com/users/tushargupta51/orgs","repos_url":"https://api.github.com/users/tushargupta51/repos","events_url":"https://api.github.com/users/tushargupta51/events{/privacy}","received_events_url":"https://api.github.com/users/tushargupta51/received_events","type":"User","site_admin":false},"body":"1. Add ctors to RsaSecurityKey and EcDSASecurityKey that takes rsa and ecdsa instances respectively: #325 \r\n2. SignatureProviderFactory => CryptoProviderFactory\r\n3. Split JsonConstants and JwtConstants classes into proper classes\r\n4. Clean up signature provider tests\r\n5. #318 : use ascii hashing\r\n6. #280: revert test workaround","created_at":"2015-12-22T21:06:29Z","updated_at":"2016-01-06T02:25:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dceeeeaa0c505dee8d1388ba3647d5334e8b629","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334/commits","review_comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334/comments","review_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/334/comments","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/statuses/b86ad30dcd8f2ea868e8943943488168ec3420c8","head":{"label":"AzureAD:Rc2Fixes","ref":"Rc2Fixes","sha":"b86ad30dcd8f2ea868e8943943488168ec3420c8","user":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"repo":{"id":17496194,"name":"azure-activedirectory-identitymodel-extensions-for-dotnet","full_name":"AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","owner":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","description":"IdentityModel extensions for .Net","fork":false,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","forks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/forks","keys_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/teams","hooks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/hooks","issue_events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/events","assignees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/tags","blobs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/languages","stargazers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/stargazers","contributors_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/contributors","subscribers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/subscribers","subscription_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/subscription","commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/merges","archive_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/downloads","issues_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases{/id}","created_at":"2014-03-06T23:18:05Z","updated_at":"2016-01-04T21:16:22Z","pushed_at":"2015-12-30T18:18:58Z","git_url":"git://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet.git","ssh_url":"git@github.com:AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet.git","clone_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet.git","svn_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","homepage":"","size":3587,"stargazers_count":99,"watchers_count":99,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":45,"forks":40,"open_issues":45,"watchers":99,"default_branch":"master"}},"base":{"label":"AzureAD:KDev","ref":"KDev","sha":"038ece2246715b46050e56ea2fc41510a0706d0a","user":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"repo":{"id":17496194,"name":"azure-activedirectory-identitymodel-extensions-for-dotnet","full_name":"AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","owner":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","description":"IdentityModel extensions for .Net","fork":false,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","forks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/forks","keys_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/teams","hooks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/hooks","issue_events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/events{/number}","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/events","assignees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/assignees{/user}","branches_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/branches{/branch}","tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/tags","blobs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/statuses/{sha}","languages_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/languages","stargazers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/stargazers","contributors_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/contributors","subscribers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/subscribers","subscription_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/subscription","commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/contents/{+path}","compare_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/merges","archive_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/downloads","issues_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues{/number}","pulls_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls{/number}","milestones_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/milestones{/number}","notifications_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/labels{/name}","releases_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases{/id}","created_at":"2014-03-06T23:18:05Z","updated_at":"2016-01-04T21:16:22Z","pushed_at":"2015-12-30T18:18:58Z","git_url":"git://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet.git","ssh_url":"git@github.com:AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet.git","clone_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet.git","svn_url":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet","homepage":"","size":3587,"stargazers_count":99,"watchers_count":99,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":45,"forks":40,"open_issues":45,"watchers":99,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334"},"html":{"href":"https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pull/334"},"issue":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/334"},"comments":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/issues/334/comments"},"review_comments":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334/comments"},"review_comment":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/pulls/334/commits"},"statuses":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/statuses/b86ad30dcd8f2ea868e8943943488168ec3420c8"}}}}