-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Digest authentication support #131
Merged
Merged
Changes from 63 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
31197b8
Added HTTP Digest authentication support
mksh fffaaca
Added docstrings; got rid of assertDictEqual in test_digest_auth_mult…
mksh 0c5d729
PEP8
mksh 1d3b18c
Docstrings, typing fixes and small code improvements
mksh 42d695d
Fix POST Request Digest Authentication
jameshilliard e749665
python 3 urlparse compatibility
jameshilliard a627f0b
Refactor build_digest_authentication_header as a private method of _R…
jameshilliard aa8e102
Make username and password private
jameshilliard 2c1817e
Remove redundant agent arguement from _build_digest_authentication_he…
jameshilliard 91a5c7b
Remove redundant None default from self.digest_auth_cache.get
jameshilliard 19f6ad8
Use bytes instead of strings
jameshilliard 1848e93
Fix python 3 digest hash encoding
jameshilliard 5651fc3
Use byte encoding for MD5-SESS digest
jameshilliard 2e2e6d8
Merge branch 'master' of https://github.com/twisted/treq into HTTPDig…
jameshilliard 9e6e298
Fix python3 auth multiple calls test
jameshilliard ffdbfa7
Pass correct algorithm back for digest auth
jameshilliard 4bd52ff
set default algorithm for digest auth
jameshilliard a4dd9f2
PEP8
jameshilliard 05ecf65
sha256 digest support
jameshilliard 4ae05dc
Merge branch 'master' into HTTPDigestAuth
jameshilliard b9f4452
Merge branch 'master' into HTTPDigestAuth
jameshilliard 1283fea
Merge branch 'master' of https://github.com/twisted/treq into HTTPDig…
jameshilliard 03b784b
bump httpbin version
jameshilliard 3515008
Add more tests and sha512 digest support.
jameshilliard e0d7208
Set opaque header for digest auth
jameshilliard 457c56a
Merge branch 'upstream-master' into HEAD
mksh f8c5e7f
Make treq.auth.generate_client_nonce() private
mksh dcc772d
Refactor digest auth parameter caching, add unit tests
mksh f1e3222
None is default ret value of .get()
mksh 00af1b7
Fix flakes for test_auth.py
mksh 8ca2274
Merge branch 'master' into feature/http-digest-auth
7dba100
Merge branch 'master' into feature/http-digest-auth
glyph 8150f5d
Merge branch 'trunk' into HTTPDigestAuth
jameshilliard ec3e5c9
Use urlparse from urllib instead of six
jameshilliard 259a059
Add type annotations
jameshilliard c5a6e86
Fix digest auth comment links
jameshilliard f5a30ea
Improve digest auth howto caching wording
jameshilliard b87b767
Add blank lines around param comments
jameshilliard d01bd08
Don't hardcode qop as auth
jameshilliard 73a68d3
Use agent_spy instead of mock in test_add_digest_auth.
jameshilliard b1ade85
Use self.patch instead of MonkeyPatcher
jameshilliard d9a48a6
Use nonlocal for call counter variable
jameshilliard 455605d
Cleanup test_digest_auth_multiple_calls nonlocal variable naming and …
jameshilliard 12c0739
Make cached_metadata_for private
jameshilliard 4a8e463
Fix treq integration test docstring indentation
jameshilliard 99a0532
Refactor build_authentication_header based on current requests fstrin…
jameshilliard 5269ff1
Make build_authentication_header private
jameshilliard 4cbd556
Use _DIGEST_ALGO enum for digest auth algo
jameshilliard 5359a2a
Improve and add additional digest auth test docstring
jameshilliard 484b9ba
Merge commit '08bb4d3f878e79c6d0755fd80b74ffd9ccdc2726' into HTTPDige…
jameshilliard bcb946d
Merge branch 'trunk' into HTTPDigestAuth
glyph 57769c9
Merge branch 'trunk' into HTTPDigestAuth
twm b5f5d95
Merge branch 'trunk' into HTTPDigestAuth
glyph f833561
version bump on mypy basepython
glyph 1c35956
current brotlipy doesn't build against 3.10 any more, mypy transitive…
glyph 9198250
try to catch up this PR with the new, stricter requirements treq has …
glyph e1cf128
add test-case-name
glyph 580eb8a
now that we're using enums properly, format them properly
glyph 92fd51c
upgrade setup-python to correspond to new mypy basepython
glyph ae9d582
same mistake again on the docs env
glyph ffa168e
annotations import
glyph 7ab4927
extend test-case-name for the missed parts
glyph fc145a4
no peeking at private attributes
glyph c27e977
Update src/treq/auth.py
glyph badf9fb
remove unnecessary extra public API
glyph a688242
Merge branch 'trunk' into HTTPDigestAuth
glyph File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from twisted.internet.task import react | ||
from _utils import print_response | ||
|
||
import treq | ||
from treq.auth import HTTPDigestAuth | ||
|
||
|
||
def main(reactor, *args): | ||
d = treq.get( | ||
'http://httpbin.org/digest-auth/auth/treq/treq', | ||
auth=HTTPDigestAuth('treq', 'treq') | ||
) | ||
d.addCallback(print_response) | ||
return d | ||
|
||
react(main, []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉