iphone - How to implement NTLM Authentication for UIWebView? -


i have use case uiwebview may need connect web server secured ntlm. have use case have credentials passed. instead of forcing user enter them, how perform handshake uiwebview?

update:

using method here works enough when doing simple requests, utterly fails when doing posts, mere fact doing after posted.

the asihttprequest , asiwebpagerequest have same problem. requests work wonders, posts don't work. if world worked on requests.

i have been able use this method of including username , password in http request string, grossly insecure defy reason using it. using sniffer able see three-way handshake occur without problems on both , post requests.

you can set default credential:

nsurlprotectionspace *protectionspace = [[nsurlprotectionspace alloc]                                              initwithhost: _host                                              port: 80                                              protocol: @"http"                                              realm: _host                                              authenticationmethod:nsurlauthenticationmethodntlm];  [[nsurlcredentialstorage sharedcredentialstorage] setdefaultcredential:[nsurlcredential credentialwithuser:_username password:_password persistence:nsurlcredentialpersistenceforsession] forprotectionspace:protectionspace]; 

now can let webviews request, , when encounters protenctionspace logs in using given credentials


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -