I'm trying to create a http client with RestKit in iOS. My question is easy, "Can RestKit do a HTTP digest authentication? ".
I know how to do a basic auth, with:
NSURL *baseUrl = [[NSURL alloc]initWithString:@"https://helloEveryone.com"];
RKObjectManager* objectManager = [RKObjectManager managerWithBaseURL:baseUrl];
[objectManager.HTTPClient setAuthorizationHeaderWithUsername:@"user" password:@"password"];
But I obtain this error in response:
Underlying HTTP request operation failed with error: Error Domain=NSURLErrorDomain
Code=-1202 "The certificate for this server is invalid.
You might be connecting to a server that is pretending to be “helloEveryone.com”
which could put your confidential information at risk."
I know that i need to do a Digest auth, but I don't know if RestKit is able to do it.
If the answer is "Yes". ¿Could anyone tell me how? (I'm using RestKit 0.20.3)
Thanks a lot.
SOLVED: It was a certificate error. I found the solution HERE