views:

12

answers:

1

ASIHTTPRequest can store the username/password in the Keychain. How does this work?

1) Is the built in authentication dialog (ASIAuthenticationDialog) coming up and stores the username/password only for the first time? When will the dialog be presented?

2) What about the next requests? Is always the same username/password used?

3) What is if another username/password should be used?

4) What is if a wrong password had been typed in?

5) Any OS constraints?

I'm asking because I never tried that. I'm using SFHF for storing passwords in the Keychain.

A: 

1) yes, only if a password is required (ie. a http 401 response code) and asihttprequest doesn't already have access to one (or the one it has is wrong)

2) if the requests are to the same area of the same server, yes

3) in that case you would need to deal with it yourself, or the user will be presented with the dialogue again if the server rejects the existing credentials with a 401 code

4) I think the dialogue will appear again. I'm not sure. This should be an easy one for you to test yourself :)

5) Don't think so. None are mentioned on http://allseeing-i.com/ASIHTTPRequest/How-to-use#handling_http_authentication so it would just be the same as asihttp request itself, which is Mac OS 10.5 or later and iOS 3.0 or later.

JosephH