composer/composer — pull request #1657 by shochdoerfer (2013-03-04 17:56:12+00:00)
Title: Add HTTP Basic auth handling when quering a Composer Repo

Dealing with a HTTP basic auth protected Composer Repo (e.g. private Satis Repo) was not possible as an Composer\Downloader\TransportException gets thrown when Composer tries to download the packages.json file.

The PR fixes that by extending the fetchFile() method of the ComposerRepository class. In case the remote resource responds with a 401 we ask the user for the access credentials and retry querying the resource again.