如何实现NTLM验证了一个UIWebView? [英] How to implement NTLM Authentication for UIWebView?

查看:151
本文介绍了如何实现NTLM验证了一个UIWebView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用案例,其中一个的UIWebView 可能需要与NTLM安全的Web服务器连接。我也有,我已经有凭据传递一个用例。因此,而不是强迫用户输入他们,我怎么执行与握手的UIWebView

I have a use case where a UIWebView may need to connect with a web server secured with NTLM. I also have a use case where I already have the credentials to be passed. So instead of forcing the user to enter them, how do I perform the handshake with the UIWebView?

更新:

使用此方法<一href=\"http://stackoverflow.com/questions/1769888/how-to-display-the-authentication-challenge-in-uiwebview\">here工作得很好,当你在做简单的GET请求,但完全在做职位时,对于这一事实,它正在做得到它发布后失败。

Using this method here works well enough when you are doing simple GET requests, but utterly fails when doing POSTs, for the mere fact that it is doing a GET after it is posted.

的ASIHtt prequest和ASIWebPageRequest有同样的问题。 GET请求奇迹,但任何文章只是不工作。如果世界上的工作只是GET请求。

The ASIHttpRequest and ASIWebPageRequest have the same problem. GET requests work wonders, but any POSTs just don't work. If only the world worked on just GET requests.

我已经能够使用<一个href=\"http://stackoverflow.com/questions/3349240/uiwebview-does-not-persist-authentication-on-ios3-2-ios4\">this包括在HTTP请求字符串的用户名和密码的方法,但就是这么严重不安全的反抗之所以使用它。使用嗅探器,我能看到三次握手没有出现在两个GET和POST请求的任何问题。

I have been able to use this method of including the username and password in the HTTP request string, but that is so grossly insecure as to defy reason for using it. Using a sniffer I am able to see the three-way handshake occur without any problems on both GET and POST requests.

推荐答案

随着iOS 3.2和4.1的,没有任何的公共的截取的NTLM挑战委托。然而,有,可重写给这个适当的支持的私人API。由于这将使您的应用程序被拒绝的危险,我将放弃张贴code,因为它是不值得的present时间应用程序商店的发展。

As of iOS 3.2 and 4.1, there is no public delegate for intercepting the NTLM challenge. There is, however, a private API that can be overriden to give proper support for this. Since this would put your application in danger of being rejected, I will forgo posting the code because it is of no worth for App Store development at the present time.

这篇关于如何实现NTLM验证了一个UIWebView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆