Skip to content

Commit

Permalink
Merge pull request #390 from twisted/revert-digest-auth
Browse files Browse the repository at this point in the history
Revert "HTTP Digest Authentication support" (#267)
  • Loading branch information
glyph authored Jul 1, 2024
2 parents 22a776d + 79b657a commit 8bbd32a
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 711 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.11'

- uses: actions/cache@v4
with:
Expand All @@ -42,7 +42,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.11"

- uses: actions/cache@v4
with:
Expand Down
16 changes: 0 additions & 16 deletions docs/examples/digest_auth.py

This file was deleted.

21 changes: 0 additions & 21 deletions docs/howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,6 @@ The ``auth`` argument should be a tuple of the form ``('username', 'password')``

Full example: :download:`basic_auth.py <examples/basic_auth.py>`

HTTP Digest authentication is supported by passing an instance of
:py:class:`treq.auth.HTTPDigestAuth` to any of the request functions by using the `auth` keyword argument.
We support only "auth" QoP as defined at `RFC 2617`_
or simple `RFC 2069`_ without QoP at the moment. Treq takes care of
caching HTTP digest credentials — after authorizing any URL/method pair,
the library will use the initially received HTTP digest credentials on that endpoint
for subsequent requests, and will not perform any redundant requests to obtain the
credentials.

:py:class:`treq.auth.HTTPDigestAuth` class accepts ``username`` and ``password``
as constructor arguments.

.. literalinclude:: examples/digest_auth.py
:linenos:
:lines: 5-14

Full example: :download:`digest_auth.py <examples/digest_auth.py>`

.. _RFC 2617: http://www.ietf.org/rfc/rfc2617.txt
.. _RFC 2069: http://www.ietf.org/rfc/rfc2069.txt

Redirects
---------

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Here is a list of `requests`_ features and their status in treq.
+----------------------------------+----------+----------+
| Basic Authentication | yes | yes |
+----------------------------------+----------+----------+
| Digest Authentication | yes | yes |
| Digest Authentication | yes | no |
+----------------------------------+----------+----------+
| Elegant Key/Value Cookies | yes | yes |
+----------------------------------+----------+----------+
Expand Down
Loading

0 comments on commit 8bbd32a

Please sign in to comment.