libgit2/libgit2 — pull request #1048 by pwkelley (2012-11-06 14:02:08+00:00)
Title: Basic authentication for http and winhttp

This PR defines public interfaces for credential objects and credentials acquisition callbacks. It implements one kind of credential object, for plaintext username/password pairs.

The winhttp and http subtransports have been modified to catch 401 Unauthorized responses for `GET` requests. They call out to the credentials acquisition callback, if defined, and collect credentials to be used with the Basic authentication scheme. I have not added support for the Digest mechanism but it would be easy to do so -- Digest also uses a plaintext username/password credential.

This work is a prerequisite for @schu's implementation of push, if we want push to work against Github.