authdigest(username,
password,
challenge,
request,
nonce_count)
| source code
|
Given a username, password, a list of challenge fields, a request a
sequence number (nonce_count) return a Diget Auth challenge answer
If username is None, then challenge will contain a username key with
the username and the password parameter will be the cached value of the
HA1 (see the function below) to be used
- Parameters:
username (str|None) - The username to reply to the challenge or None to indicate that
the password contains a HA1 cache
password (str) - The password to reply to the challenge or a HA1 cache
challenge (dict) - Dictionary with the parameters in the challenge
request (HttxRequest) - The request that has generated the auth challenge
nonce_count (int) - Sequence value if this not the first time such a request has been
seen. Used by Digest auth to prevent replay attacks
- Returns: tuple (str|None, str|None)
- A tuple containing a digest answer and a string with a
cache-able challenge for future responses Both values can be None
if a specific non-supported variant of the Digest Auth is used
|