{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/comments/47635540","id":47635540,"diff_hunk":"@@ -1,10 +1,14 @@\n CHANGELOG\n =========\n \n-0.3.0 (unreleased)\n+1.0.0 (unreleased)\n ------------------\n \n-- Nothing changed yet.\n+- Simplified API for using HawkAuth when the id and key are known. (#8)\n+- Added support for overriding the default algorithm (sha256) when deriving\n+credentials from the hawk session token (use the new ``algorithm`` parameter).","path":"CHANGES.txt","position":11,"original_position":11,"commit_id":"1ef4abc56fbf47ecace0245e3a62597dec21a41c","original_commit_id":"1ef4abc56fbf47ecace0245e3a62597dec21a41c","user":{"login":"almet","id":67073,"avatar_url":"https://avatars.githubusercontent.com/u/67073?v=3","gravatar_id":"","url":"https://api.github.com/users/almet","html_url":"https://github.com/almet","followers_url":"https://api.github.com/users/almet/followers","following_url":"https://api.github.com/users/almet/following{/other_user}","gists_url":"https://api.github.com/users/almet/gists{/gist_id}","starred_url":"https://api.github.com/users/almet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almet/subscriptions","organizations_url":"https://api.github.com/users/almet/orgs","repos_url":"https://api.github.com/users/almet/repos","events_url":"https://api.github.com/users/almet/events{/privacy}","received_events_url":"https://api.github.com/users/almet/received_events","type":"User","site_admin":false},"body":"nit: please align the second line with the first one.","created_at":"2015-12-15T13:33:11Z","updated_at":"2015-12-15T13:33:11Z","html_url":"https://github.com/mozilla-services/requests-hawk/pull/14#discussion_r47635540","pull_request_url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/comments/47635540"},"html":{"href":"https://github.com/mozilla-services/requests-hawk/pull/14#discussion_r47635540"},"pull_request":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14","id":52762137,"html_url":"https://github.com/mozilla-services/requests-hawk/pull/14","diff_url":"https://github.com/mozilla-services/requests-hawk/pull/14.diff","patch_url":"https://github.com/mozilla-services/requests-hawk/pull/14.patch","issue_url":"https://api.github.com/repos/mozilla-services/requests-hawk/issues/14","number":14,"state":"open","locked":false,"title":"Simplify the API for using HawkAuth when the id and key are known","user":{"login":"edmorley","id":501702,"avatar_url":"https://avatars.githubusercontent.com/u/501702?v=3","gravatar_id":"","url":"https://api.github.com/users/edmorley","html_url":"https://github.com/edmorley","followers_url":"https://api.github.com/users/edmorley/followers","following_url":"https://api.github.com/users/edmorley/following{/other_user}","gists_url":"https://api.github.com/users/edmorley/gists{/gist_id}","starred_url":"https://api.github.com/users/edmorley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmorley/subscriptions","organizations_url":"https://api.github.com/users/edmorley/orgs","repos_url":"https://api.github.com/users/edmorley/repos","events_url":"https://api.github.com/users/edmorley/events{/privacy}","received_events_url":"https://api.github.com/users/edmorley/received_events","type":"User","site_admin":false},"body":"Previously a `credentials` dict would have to have been constructed, that contained the `id`, `key`, and `algorithm` - that could then be passed to the `HawkAuth` constructor. However a dict is less user-friendly than just passing the parameters directly - and the algorithm rarely varied in practice, so it makes more sense for that to have a default.\r\n\r\nAs such, the `HawkAuth` constructor has been changed to accept `id` and `key` parameters, and the existing `credentials` parameter has been removed. The algorithm defaults to `sha256`, but can be overridden with a new `algorithm` parameter. This parameter also allows overriding the algorithm when deriving the credentials from the hawk session token, which wasn't previously possible.\r\n\r\nPassing the `credentials` parameter now results in an exception with migration advice - as such the major version of this package must be bumped for the next release.\r\n\r\nThere was a bunch of cleanup needed (and/or desirable to keep diffs simpler) prior to these changes - please see the individual commits for clearer diffs and multi-line commit messages with rationale :-)\r\n\r\nFixes #8.","created_at":"2015-12-05T19:17:42Z","updated_at":"2015-12-15T13:33:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"213199d60189f4196da1b940a0db6e9cfefb7594","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/requests-hawk/issues/14/comments","statuses_url":"https://api.github.com/repos/mozilla-services/requests-hawk/statuses/1ef4abc56fbf47ecace0245e3a62597dec21a41c","head":{"label":"edmorley:simplify-credentials-api","ref":"simplify-credentials-api","sha":"1ef4abc56fbf47ecace0245e3a62597dec21a41c","user":{"login":"edmorley","id":501702,"avatar_url":"https://avatars.githubusercontent.com/u/501702?v=3","gravatar_id":"","url":"https://api.github.com/users/edmorley","html_url":"https://github.com/edmorley","followers_url":"https://api.github.com/users/edmorley/followers","following_url":"https://api.github.com/users/edmorley/following{/other_user}","gists_url":"https://api.github.com/users/edmorley/gists{/gist_id}","starred_url":"https://api.github.com/users/edmorley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmorley/subscriptions","organizations_url":"https://api.github.com/users/edmorley/orgs","repos_url":"https://api.github.com/users/edmorley/repos","events_url":"https://api.github.com/users/edmorley/events{/privacy}","received_events_url":"https://api.github.com/users/edmorley/received_events","type":"User","site_admin":false},"repo":{"id":46342975,"name":"requests-hawk","full_name":"edmorley/requests-hawk","owner":{"login":"edmorley","id":501702,"avatar_url":"https://avatars.githubusercontent.com/u/501702?v=3","gravatar_id":"","url":"https://api.github.com/users/edmorley","html_url":"https://github.com/edmorley","followers_url":"https://api.github.com/users/edmorley/followers","following_url":"https://api.github.com/users/edmorley/following{/other_user}","gists_url":"https://api.github.com/users/edmorley/gists{/gist_id}","starred_url":"https://api.github.com/users/edmorley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmorley/subscriptions","organizations_url":"https://api.github.com/users/edmorley/orgs","repos_url":"https://api.github.com/users/edmorley/repos","events_url":"https://api.github.com/users/edmorley/events{/privacy}","received_events_url":"https://api.github.com/users/edmorley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edmorley/requests-hawk","description":"Hawk authentication strategy for the requests python library.","fork":true,"url":"https://api.github.com/repos/edmorley/requests-hawk","forks_url":"https://api.github.com/repos/edmorley/requests-hawk/forks","keys_url":"https://api.github.com/repos/edmorley/requests-hawk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edmorley/requests-hawk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edmorley/requests-hawk/teams","hooks_url":"https://api.github.com/repos/edmorley/requests-hawk/hooks","issue_events_url":"https://api.github.com/repos/edmorley/requests-hawk/issues/events{/number}","events_url":"https://api.github.com/repos/edmorley/requests-hawk/events","assignees_url":"https://api.github.com/repos/edmorley/requests-hawk/assignees{/user}","branches_url":"https://api.github.com/repos/edmorley/requests-hawk/branches{/branch}","tags_url":"https://api.github.com/repos/edmorley/requests-hawk/tags","blobs_url":"https://api.github.com/repos/edmorley/requests-hawk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edmorley/requests-hawk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edmorley/requests-hawk/git/refs{/sha}","trees_url":"https://api.github.com/repos/edmorley/requests-hawk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edmorley/requests-hawk/statuses/{sha}","languages_url":"https://api.github.com/repos/edmorley/requests-hawk/languages","stargazers_url":"https://api.github.com/repos/edmorley/requests-hawk/stargazers","contributors_url":"https://api.github.com/repos/edmorley/requests-hawk/contributors","subscribers_url":"https://api.github.com/repos/edmorley/requests-hawk/subscribers","subscription_url":"https://api.github.com/repos/edmorley/requests-hawk/subscription","commits_url":"https://api.github.com/repos/edmorley/requests-hawk/commits{/sha}","git_commits_url":"https://api.github.com/repos/edmorley/requests-hawk/git/commits{/sha}","comments_url":"https://api.github.com/repos/edmorley/requests-hawk/comments{/number}","issue_comment_url":"https://api.github.com/repos/edmorley/requests-hawk/issues/comments{/number}","contents_url":"https://api.github.com/repos/edmorley/requests-hawk/contents/{+path}","compare_url":"https://api.github.com/repos/edmorley/requests-hawk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edmorley/requests-hawk/merges","archive_url":"https://api.github.com/repos/edmorley/requests-hawk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edmorley/requests-hawk/downloads","issues_url":"https://api.github.com/repos/edmorley/requests-hawk/issues{/number}","pulls_url":"https://api.github.com/repos/edmorley/requests-hawk/pulls{/number}","milestones_url":"https://api.github.com/repos/edmorley/requests-hawk/milestones{/number}","notifications_url":"https://api.github.com/repos/edmorley/requests-hawk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edmorley/requests-hawk/labels{/name}","releases_url":"https://api.github.com/repos/edmorley/requests-hawk/releases{/id}","created_at":"2015-11-17T11:32:39Z","updated_at":"2015-11-17T11:32:40Z","pushed_at":"2015-12-05T19:19:05Z","git_url":"git://github.com/edmorley/requests-hawk.git","ssh_url":"git@github.com:edmorley/requests-hawk.git","clone_url":"https://github.com/edmorley/requests-hawk.git","svn_url":"https://github.com/edmorley/requests-hawk","homepage":"","size":31,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mozilla-services:master","ref":"master","sha":"5cbc81acf71584413ee5a2a65bf8ac951f0f9c50","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":21897944,"name":"requests-hawk","full_name":"mozilla-services/requests-hawk","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/requests-hawk","description":"Hawk authentication strategy for the requests python library.","fork":false,"url":"https://api.github.com/repos/mozilla-services/requests-hawk","forks_url":"https://api.github.com/repos/mozilla-services/requests-hawk/forks","keys_url":"https://api.github.com/repos/mozilla-services/requests-hawk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/requests-hawk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/requests-hawk/teams","hooks_url":"https://api.github.com/repos/mozilla-services/requests-hawk/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/requests-hawk/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/requests-hawk/events","assignees_url":"https://api.github.com/repos/mozilla-services/requests-hawk/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/requests-hawk/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/requests-hawk/tags","blobs_url":"https://api.github.com/repos/mozilla-services/requests-hawk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/requests-hawk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/requests-hawk/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/requests-hawk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/requests-hawk/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/requests-hawk/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/requests-hawk/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/requests-hawk/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/requests-hawk/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/requests-hawk/subscription","commits_url":"https://api.github.com/repos/mozilla-services/requests-hawk/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/requests-hawk/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/requests-hawk/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/requests-hawk/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/requests-hawk/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/requests-hawk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/requests-hawk/merges","archive_url":"https://api.github.com/repos/mozilla-services/requests-hawk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/requests-hawk/downloads","issues_url":"https://api.github.com/repos/mozilla-services/requests-hawk/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/requests-hawk/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/requests-hawk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/requests-hawk/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/requests-hawk/releases{/id}","created_at":"2014-07-16T11:22:11Z","updated_at":"2015-10-22T16:40:17Z","pushed_at":"2015-12-05T19:19:05Z","git_url":"git://github.com/mozilla-services/requests-hawk.git","ssh_url":"git@github.com:mozilla-services/requests-hawk.git","clone_url":"https://github.com/mozilla-services/requests-hawk.git","svn_url":"https://github.com/mozilla-services/requests-hawk","homepage":"","size":25,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14"},"html":{"href":"https://github.com/mozilla-services/requests-hawk/pull/14"},"issue":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/issues/14"},"comments":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/requests-hawk/statuses/1ef4abc56fbf47ecace0245e3a62597dec21a41c"}}}}