| | |
- A1(username, realm, passwd, nonce=None, cnonce=None)
- A2(method, uri)
- H(val)
- KD(secret, data)
- build_authorization_arg(authdict)
- Create an "Authorization" header value from an authdict (created by generate_response()).
- dict_fetch(d, k, defval=None)
- fetch_challenge(http_header)
- apparently keywords Basic and Digest are not being checked
anywhere and decisions are being made based on authorization
configuration of client, so I guess you better know what you are
doing. Here I am requiring one or the other be specified.
challenge Basic auth_param
challenge Digest auth_param
- generate_response(chaldict, uri, username, passwd, method='GET', cnonce=None)
- Generate an authorization response dictionary. chaldict should contain the digest
challenge in dict form. Use fetch_challenge to create a chaldict from a HTTPResponse
object like this: fetch_challenge(res.getheaders()).
returns dict (the authdict)
Note. Use build_authorization_arg() to turn an authdict into the final Authorization
header value.
- md5(...)
- new([arg]) -> md5 object
Return a new md5 object. If arg is present, the method call update(arg)
is made.
|