{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/comments/156795684","pull_request_review_id":83331204,"id":156795684,"diff_hunk":"@@ -0,0 +1,92 @@\n+#---------------------------------------------------------------------------------------------\n+# Copyright (c) Microsoft Corporation. All rights reserved.\n+# Licensed under the MIT License. See License.txt in the project root for license information.\n+#---------------------------------------------------------------------------------------------\n+import codecs\n+import json\n+import cryptography\n+from ..models import JsonWebKey\n+from cryptography.hazmat.primitives.asymmetric.rsa import RSAPrivateNumbers, RSAPublicNumbers, \\\n+    generate_private_key, rsa_crt_dmp1, rsa_crt_dmq1, rsa_crt_iqmp\n+from base64 import b64encode, b64decode\n+import os\n+import hmac\n+import hashlib\n+\n+def _str_to_b64(str, **kwargs):\n+    \"\"\"Serialize str into base-64 string.\n+    :param str: Object to be serialized.\n+    :rtype: str\n+    \"\"\"\n+    encoded = b64encode(str.encode('ascii')).decode('ascii')\n+    return encoded.strip('=').replace('+', '-').replace('/', '_')\n+\n+\n+def _b64_to_str(b64str):\n+    \"\"\"Deserialize base64 encoded string into string.\n+    :param str b64str: response string to be deserialized.\n+    :rtype: bytearray\n+    :raises: TypeError if string format invalid.\n+    \"\"\"\n+    padding = '=' * (3 - (len(b64str) + 3) % 4)\n+    b64str = b64str + padding\n+    encoded = b64str.replace('-', '+').replace('_', '/')\n+    return b64decode(encoded).decode('ascii')\n+\n+\n+class JoseHeader(object):\n+\n+    def __init__(self):","path":"azure-keyvault/azure/keyvault/custom/jose.py","position":39,"original_position":39,"commit_id":"091c6af5c7f705c05c6d664828e148ac8393d35a","original_commit_id":"091c6af5c7f705c05c6d664828e148ac8393d35a","user":{"login":"lmazuel","id":1050156,"avatar_url":"https://avatars3.githubusercontent.com/u/1050156?v=4","gravatar_id":"","url":"https://api.github.com/users/lmazuel","html_url":"https://github.com/lmazuel","followers_url":"https://api.github.com/users/lmazuel/followers","following_url":"https://api.github.com/users/lmazuel/following{/other_user}","gists_url":"https://api.github.com/users/lmazuel/gists{/gist_id}","starred_url":"https://api.github.com/users/lmazuel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmazuel/subscriptions","organizations_url":"https://api.github.com/users/lmazuel/orgs","repos_url":"https://api.github.com/users/lmazuel/repos","events_url":"https://api.github.com/users/lmazuel/events{/privacy}","received_events_url":"https://api.github.com/users/lmazuel/received_events","type":"User","site_admin":false},"body":"Empty __init__ unnecessary","created_at":"2017-12-13T21:49:30Z","updated_at":"2017-12-13T21:49:31Z","html_url":"https://github.com/Azure/azure-sdk-for-python/pull/1686#discussion_r156795684","pull_request_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/comments/156795684"},"html":{"href":"https://github.com/Azure/azure-sdk-for-python/pull/1686#discussion_r156795684"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686","id":157314648,"html_url":"https://github.com/Azure/azure-sdk-for-python/pull/1686","diff_url":"https://github.com/Azure/azure-sdk-for-python/pull/1686.diff","patch_url":"https://github.com/Azure/azure-sdk-for-python/pull/1686.patch","issue_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues/1686","number":1686,"state":"open","locked":false,"title":"[KeyVault] [Do Not Merge] Enabling message protection protocol","user":{"login":"schaabs","id":11322348,"avatar_url":"https://avatars1.githubusercontent.com/u/11322348?v=4","gravatar_id":"","url":"https://api.github.com/users/schaabs","html_url":"https://github.com/schaabs","followers_url":"https://api.github.com/users/schaabs/followers","following_url":"https://api.github.com/users/schaabs/following{/other_user}","gists_url":"https://api.github.com/users/schaabs/gists{/gist_id}","starred_url":"https://api.github.com/users/schaabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schaabs/subscriptions","organizations_url":"https://api.github.com/users/schaabs/orgs","repos_url":"https://api.github.com/users/schaabs/repos","events_url":"https://api.github.com/users/schaabs/events{/privacy}","received_events_url":"https://api.github.com/users/schaabs/received_events","type":"User","site_admin":false},"body":"The changes in this pull request enable the message protection protocol, which is needed to perform key operations against vaults with message protection enabled. \r\n\r\n@herveyw PTAL\r\n\r\nThis pull request is intended for a first pass review and should not be merged at this time.","created_at":"2017-12-08T19:19:36Z","updated_at":"2017-12-13T21:49:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ebceac9bd72e8b4e59273ee4ac04627bc558a12","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues/1686/comments","statuses_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/statuses/091c6af5c7f705c05c6d664828e148ac8393d35a","head":{"label":"schaabs:mcrypt","ref":"mcrypt","sha":"091c6af5c7f705c05c6d664828e148ac8393d35a","user":{"login":"schaabs","id":11322348,"avatar_url":"https://avatars1.githubusercontent.com/u/11322348?v=4","gravatar_id":"","url":"https://api.github.com/users/schaabs","html_url":"https://github.com/schaabs","followers_url":"https://api.github.com/users/schaabs/followers","following_url":"https://api.github.com/users/schaabs/following{/other_user}","gists_url":"https://api.github.com/users/schaabs/gists{/gist_id}","starred_url":"https://api.github.com/users/schaabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schaabs/subscriptions","organizations_url":"https://api.github.com/users/schaabs/orgs","repos_url":"https://api.github.com/users/schaabs/repos","events_url":"https://api.github.com/users/schaabs/events{/privacy}","received_events_url":"https://api.github.com/users/schaabs/received_events","type":"User","site_admin":false},"repo":{"id":87105140,"name":"azure-sdk-for-python","full_name":"schaabs/azure-sdk-for-python","owner":{"login":"schaabs","id":11322348,"avatar_url":"https://avatars1.githubusercontent.com/u/11322348?v=4","gravatar_id":"","url":"https://api.github.com/users/schaabs","html_url":"https://github.com/schaabs","followers_url":"https://api.github.com/users/schaabs/followers","following_url":"https://api.github.com/users/schaabs/following{/other_user}","gists_url":"https://api.github.com/users/schaabs/gists{/gist_id}","starred_url":"https://api.github.com/users/schaabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schaabs/subscriptions","organizations_url":"https://api.github.com/users/schaabs/orgs","repos_url":"https://api.github.com/users/schaabs/repos","events_url":"https://api.github.com/users/schaabs/events{/privacy}","received_events_url":"https://api.github.com/users/schaabs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/schaabs/azure-sdk-for-python","description":"Microsoft Azure SDK for Python","fork":true,"url":"https://api.github.com/repos/schaabs/azure-sdk-for-python","forks_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/forks","keys_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/teams","hooks_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/hooks","issue_events_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/issues/events{/number}","events_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/events","assignees_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/assignees{/user}","branches_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/branches{/branch}","tags_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/tags","blobs_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/statuses/{sha}","languages_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/languages","stargazers_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/stargazers","contributors_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/contributors","subscribers_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/subscribers","subscription_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/subscription","commits_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/contents/{+path}","compare_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/merges","archive_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/downloads","issues_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/issues{/number}","pulls_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/pulls{/number}","milestones_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/milestones{/number}","notifications_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/labels{/name}","releases_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/releases{/id}","deployments_url":"https://api.github.com/repos/schaabs/azure-sdk-for-python/deployments","created_at":"2017-04-03T18:07:23Z","updated_at":"2017-04-03T18:07:31Z","pushed_at":"2017-12-13T18:51:28Z","git_url":"git://github.com/schaabs/azure-sdk-for-python.git","ssh_url":"git@github.com:schaabs/azure-sdk-for-python.git","clone_url":"https://github.com/schaabs/azure-sdk-for-python.git","svn_url":"https://github.com/schaabs/azure-sdk-for-python","homepage":"","size":48072,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"b32d9d4ad465b6e31332e134fbaf0a9da3e484bc","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":4127088,"name":"azure-sdk-for-python","full_name":"Azure/azure-sdk-for-python","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-sdk-for-python","description":"Microsoft Azure SDK for Python","fork":false,"url":"https://api.github.com/repos/Azure/azure-sdk-for-python","forks_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/forks","keys_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/teams","hooks_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/events","assignees_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/tags","blobs_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/subscription","commits_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/merges","archive_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/downloads","issues_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-sdk-for-python/deployments","created_at":"2012-04-24T16:46:12Z","updated_at":"2017-12-10T10:57:11Z","pushed_at":"2017-12-13T21:25:16Z","git_url":"git://github.com/Azure/azure-sdk-for-python.git","ssh_url":"git@github.com:Azure/azure-sdk-for-python.git","clone_url":"https://github.com/Azure/azure-sdk-for-python.git","svn_url":"https://github.com/Azure/azure-sdk-for-python","homepage":"","size":53250,"stargazers_count":481,"watchers_count":481,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":394,"mirror_url":null,"archived":false,"open_issues_count":85,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":394,"open_issues":85,"watchers":481,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686"},"html":{"href":"https://github.com/Azure/azure-sdk-for-python/pull/1686"},"issue":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues/1686"},"comments":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/issues/1686/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/pulls/1686/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-sdk-for-python/statuses/091c6af5c7f705c05c6d664828e148ac8393d35a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lmazuel"}}