~bzr-pqm/bzr/bzr.dev

  • Committer: Vincent Ladeuil
  • Date: 2007-04-21 20:39:06 UTC
  • mto: (2420.1.21 bzr.http.auth)
  • Revision ID: v.ladeuil+lp@free.fr-20070421203906-hta5jt0nmauyl9qy
Implement digest authentication. Test suite passes. Tested against apache-2.x.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.auth_required): Do not attempt to
authenticate if we don't have a user. Rework the detection of
already tried authentications. Avoid building the auth header two
times, save the auth info at the right places.
(AbstractAuthHandler.build_auth_header): Add a request parameter
for digest needs.
(BasicAuthHandler.auth_match): Simplify.
(get_digest_algorithm_impls, DigestAuthHandler): Implements client
digest authentication. MD5 and SHA algorithms are supported. Only
'auth' qop is suppoted.
(HTTPBasicAuthHandler, ProxyBasicAuthHandler): Renamed HTTPHandler
and ProxyAuthHandler respectively.
(HTTPBasicAuthHandler, ProxyBasicAuthHandler,
HTTPDigestAuthHandler, ProxyDigestAuthHandler): New classes
implementing the combinations between (http, proxy) and (basic,
digest).
(Opener.__init__): No more handlers in comment ! One TODO less !

* bzrlib/transport/http/_urllib.py:
(HttpTransport_urllib.__init__): self.base is not suitable for an
auth uri, it can contain decorators.

* bzrlib/tests/test_http.py:
(TestAuth.test_no_user): New test to check the behavior with no
user when authentication is required.

* bzrlib/tests/HTTPTestUtil.py:
(DigestAuthRequestHandler.authorized): Delegate most of the work
to the server that control the needed persistent infos.
(AuthServer): Define an auth_relam attribute.
(DigestAuthServer): Implement a first version of digest
authentication. Only the MD5 algorithm and the 'auth' qop are
supported so far.
(HTTPAuthServer.init_http_auth): New method to simplify
the [http|proxy], [basic|digest] server combinations writing.
Filename Latest Rev Last Changed Committer Comment Size
..
__init__.py 1887.1.1 18 years ago Adeodato Simó Do not separate paragraphs in the copyright statem 1 KB Diff Download File
autodoc_bash_completion.py 1861.2.8 18 years ago Alexander Belchenko More branding: bazaar-ng -> Bazaar; bazaar-ng.org 1.5 KB Diff Download File
autodoc_man.py 2374.1.1 17 years ago Ian Clatworthy Help and man page fixes 6.2 KB Diff Download File
autodoc_rstx.py 2374.1.2 17 years ago Ian Clatworthy Improved after feedback from reviewers 6.4 KB Diff Download File