joomla-framework/github-api — pull request #4 by purplebeanie (2014-03-24 23:19:54+00:00)
Title: Adds headers.Authorization basic when api.username and api.password is set

When accessing private Github repos the user needs to be authenticated. In addition to OAuth basic authentication can be used. This requires the correct header set on the Github HTTP client object. If they are not set Github returns a 404 error.

Just passing the username and password in the URL (the current behaviour) are not sufficient to ensure basic authentication.

This PR checks whether the api.password and api.username are being passed to the Github constructor at initialisation. If they are this will set the HTTP client Authorization header to Basic and include the base64 encoded api.username and api.password.

Eric.