I am having an issue with ASIHTTPRequest authentication. The steps are in the following order,
User entering wrong username and password -- > No data comes from backend and request failed delegate gets called from ASIHTTPRequest. Then goto login page again.
User enters correct values -- > Data comes as expected and request finished method gets called. Then goto login page again.
User entering wrong username and password -- > Data again comes and request finished method gets called.
The code which I am using is:
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:self];
[request setTimeOutSeconds:60];
[request setUsername:User_Name];
[request setPassword:Pass_Word];
[request setValidatesSecureCertificate:NO];
[request setShouldPresentCredentialsBeforeChallenge:NO];
[request startAsynchronous];
The backend is handling stateless webservices. What is teh problem ? and what am i doing wrong ? please help me out.
Thanks, Vinod.
You could maybe try:
[request setUseSessionPersistence:NO];
Try with shouldPresentCredentialsBeforeChallange:YES (which is the default).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With