0

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

Community
  • 1
  • 1
kemmitorz
  • 351
  • 7
  • 18
  • 2
    The error says its a certificate error, not an auth error. Is the server certificate valid and trusted? – Wain Nov 19 '13 at 15:33
  • Thanks Wain. You were right. I've edited my post with the solution. – kemmitorz Nov 19 '13 at 15:54
  • possible duplicate of [HTTPS Service is not working](http://stackoverflow.com/questions/15010975/https-service-is-not-working) – Wain Nov 19 '13 at 20:19

0 Answers0