summaryrefslogtreecommitdiff
path: root/wsgitools/digest.py
diff options
context:
space:
mode:
Diffstat (limited to 'wsgitools/digest.py')
-rw-r--r--wsgitools/digest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wsgitools/digest.py b/wsgitools/digest.py
index 7fca41c..ead4939 100644
--- a/wsgitools/digest.py
+++ b/wsgitools/digest.py
@@ -718,7 +718,10 @@ class AuthDigestMiddleware:
algo = credentials["algorithm"]
uri = credentials["uri"]
nonce = credentials["nonce"]
- a1h = self.gentoken(username, algo)
+ try:
+ a1h = self.gentoken(username, algo)
+ except TypeError:
+ a1h = self.gentoken(username)
if a1h is None:
raise ValueError
a2h = self.algorithms[algo]("%s:%s" % (reqmethod, uri))