Re: URLSession:didReceiveChallenge: does not seem to work for Basic Auth
Re: URLSession:didReceiveChallenge: does not seem to work for Basic Auth
- Subject: Re: URLSession:didReceiveChallenge: does not seem to work for Basic Auth
- From: Jens Alfke <email@hidden>
- Date: Thu, 07 Jul 2016 08:54:47 -0700
On Jul 7, 2016, at 12:44 AM, Alexander von Below < email@hidden> wrote:
I am talking to a certain REST server (you can sign up for free, so if you care I will gladly tell you), but when I try to provide basic auth credentials using URLSession:didReceiveChallenge: (which is being called), I receive a 401.
If I add the Basic Auth to the headers, everything works.
Hm. The obvious guess is that you’re providing the wrong password, but I assume you’ve ruled that out :)
My second guess is that the server doesn’t send the “WWW-Authenticate:” header requesting credentials (CouchDB does this, annoyingly), but you said that your challenge callback is being invoked, so that’s ruled out.
If you use ‘curl -i’ to GET the same URL, what does the WWW-Authenticate: header look like?
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden