Merge lp:~leonardr/lazr.restfulclient/basic-auth into lp:lazr.restfulclient
Proposed by
Leonard Richardson
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | 77 |
Merged at revision: | not available |
Proposed branch: | lp:~leonardr/lazr.restfulclient/basic-auth |
Merge into: | lp:lazr.restfulclient |
Diff against target: |
252 lines 6 files modified
setup.py (+1/-1) src/lazr/restfulclient/NEWS.txt (+5/-0) src/lazr/restfulclient/_browser.py (+55/-5) src/lazr/restfulclient/docs/authorizer.txt (+81/-0) src/lazr/restfulclient/resource.py (+4/-5) src/lazr/restfulclient/version.txt (+1/-1) |
To merge this branch: | bzr merge lp:~leonardr/lazr.restfulclient/basic-auth |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+12612@code.launchpad.net |
To post a comment you must log in.
This branch changes the way lazr.restfulclient does (or doesn't do) authentication. Previously, the ServiceRoot constructor took a "credentials" argument that didn't do anything, but that could be used by subclasses. This branch introduces the idea of "authorizers", objects that are used at specific points in the lifecycle to make sure HTTP requests are made with the correct Authorization header.
This change makes it easy to add code for common authorization techniques to lazr.restfulclient. The only authorizers in this branch are one that doesn't do anything (only useful as a superclass) and one that supports HTTP Basic Auth. I'll be moving in the OAuth authorization code from launchpadlib as an authorizer.