I am having a problem very similar to this question here: Can I use NSURLCredentialStorage for HTTP Basic Authentication?
The author of that question accepted an answer but later posted that the solution code was returning NSURLErrorUserCancelledAuthentication
errors. I am using DIGEST
authentication, but otherwise my code is doing the same thing, and returns the same error.
I do not want to send the username and password in cleartext, so I definitely don't want to simply tack the username and password onto the front of the URL. Is there some way to get NSURLConnection's sendSynchronousRequest:returningResponse:error:
method to consult the shared NSURLCredentialStorage? It sounds like the type of thing a category would be good for, but I haven't the faintest idea of how I would do it--it sounds like I'd have to completely reimplement the sendSynchronousRequest:returningResponse:error:
method to get it to work.
How can I perform a synchronous URL connection that consults the shared NSURLCredentialStorage?