EvilScott/junior — pull request #12 by kwk (2012-07-10 06:48:45+00:00)
Title: HTTP Digest and HTTP Basic authentication

Hi Scott,

I respect your thoughts on PHP installations that don't have curl and I also respect that you don't want to break your tests that were implemented against stream_context_... functions.

Nevertheless I still have to be able to hide some services behind some form of HTTP authentication. To me the cleanest design choice was to implemented this authentication layer in a sublasses of Junior\Client. Although you don't have any tests for the two new classes Junior\ClientBasicAuth and Junior\ClientDigestAuth I suggest we work on them and try to remove the dependency on curl from them.

To not break installations that don't have curl, I modified the Junior.php file to only include the authentication classes in case the curl_init function exists.

Thank you in advance,
Konrad