I am not sure about how keychain storage works

13 views
Skip to first unread message

Michele Campeotto

unread,
Feb 27, 2010, 6:49:17 PM2/27/10
to ASIHTTPRequest
I have been banging my head on this for some hours now.

With useKeychainPersistance set, if I add authentication credentials
on the request before starting it, they don't get saved in the
keychain, but they do get used if they are already there.
If instead I use the delegate to supply credentials, they get saved
and used correctly.

Is this a bug or intentional? In the latter case, I think it should be
documented, as it made me pull my hair on and off for about two days.


Thanks,
Michele

Michele Campeotto

unread,
Feb 28, 2010, 3:41:11 AM2/28/10
to ASIHTTPRequest
I forgot to add that unsetting shouldPresentCredentialsBeforeChallenge
also makes it work as expected.

--
Michele Campeotto
http://flickr.com/micampe

Ben Copsey

unread,
Mar 2, 2010, 8:34:31 AM3/2/10
to asihttp...@googlegroups.com
Hi Michele

Nice to hear from you again!

I don't think it's intentional, but yes, it does appear as though they won't be saved unless the request has already received an authentication challenge (this may never happen when using basic authentication and shouldPresentCredentialsBeforeChallenge == YES). Actually, I think it would be better to move the saving into readResponseHeaders, since that's where we find out if the credentials are good or not.

I've added a bug for this in github (http://github.com/pokeb/asi-http-request/issues/issue/24), I'll try to change this soon.

Best

Ben

Reply all
Reply to author
Forward
0 new messages