Skip to content

Commit ad7ee7c

Browse files
patchback[bot]TimMenningerfeus4177bdracoDreamsorcerer
authored
[PR #10725/ab76c5a6 backport][3.12] Digest Authentication Middleware for aiohttp (#10894)
Co-authored-by: Tim Menninger <[email protected]> Co-authored-by: jf <[email protected]> Co-authored-by: J. Nick Koston <[email protected]> Co-authored-by: J. Nick Koston <[email protected]> Co-authored-by: Sam Bull <[email protected]> closes #2213 closes #4939
1 parent 1cfe028 commit ad7ee7c

10 files changed

+1345
-0
lines changed

CHANGES/10725.feature.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Added a comprehensive HTTP Digest Authentication client middleware (DigestAuthMiddleware)
2+
that implements RFC 7616. The middleware supports all standard hash algorithms
3+
(MD5, SHA, SHA-256, SHA-512) with session variants, handles both 'auth' and
4+
'auth-int' quality of protection options, and automatically manages the
5+
authentication flow by intercepting 401 responses and retrying with proper
6+
credentials -- by :user:`feus4177`, :user:`TimMenninger`, and :user:`bdraco`.

CHANGES/2213.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10725.feature.rst

CONTRIBUTORS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ Jesus Cea
187187
Jian Zeng
188188
Jinkyu Yi
189189
Joel Watts
190+
John Feusi
190191
John Parton
191192
Jon Nabozny
192193
Jonas Krüger Svensson

aiohttp/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
WSServerHandshakeError,
4848
request,
4949
)
50+
from .client_middleware_digest_auth import DigestAuthMiddleware
5051
from .client_middlewares import ClientHandlerType, ClientMiddlewareType
5152
from .compression_utils import set_zlib_backend
5253
from .connector import (
@@ -187,6 +188,7 @@
187188
# helpers
188189
"BasicAuth",
189190
"ChainMapProxy",
191+
"DigestAuthMiddleware",
190192
"ETag",
191193
"set_zlib_backend",
192194
# http

0 commit comments

Comments
 (0)