Does CFHTTPMessageAddAuthentication support digest auth?
Does CFHTTPMessageAddAuthentication support digest auth?
- Subject: Does CFHTTPMessageAddAuthentication support digest auth?
- From: Jens Alfke <email@hidden>
- Date: Tue, 30 Jun 2015 22:03:24 -0700
I’ve run into a problem with CFHTTPMessageAddAuthentication: it works fine with HTTP Basic auth challenges, but when I try to use it with a Digest auth challenge it fails (returns false.) Searching around I ran into a StackOverflow question* posted yesterday that’s almost exactly the same as my situation.
The person who posted that question also tried using CFHTTPMessageApplyCredentials, which returns an error code not just a boolean; he got the error kCFStreamErrorHTTPAuthenticationTypeUnsupported, which definitely sounds like digest auth isn’t supported.
On the other hand, why would the API bother to define constants (i.e. kCFHTTPAuthenticationSchemeDigest) for auth schemes it doesn’t support? And why wouldn’t this API support digest auth when NSURLConnection does support it, since I assume they share a common implementation?
I really, really don’t want to have to implement RFC2617 myself. But I can’t use NSURLSession (I’m implementing a WebSocket handshake, not vanilla HTTP). All I want to do is save the users of my API from exposing their passwords in cleartext…
|
_______________________________________________
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