关于iPhone/iPad的iOS系统自动弹出认证窗口问题

来源:互联网 发布:战舰世界mac 闪退 编辑:程序博客网 时间:2024/06/05 16:43

前言

路由器,认证服务器,手持无线终端。当通过手持无线设备连接到需要认证的WiFi上,会自动弹出窗口,何解?为什么有的时候就不弹出窗口呢?怎么给商家一个合理的解释呢?


验证问题

通过在路由器上抓包来看弹出窗口的时候都发生了什么? 抓包方法如下http://blog.csdn.net/qianguozheng/article/details/32108093


当弹出认证窗口的时候都发生了什么?

当没有弹出认证窗口的时候,没有弹出认证窗口。


原理剖析

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/Platform-SpecificNetworkingTechnologies/Platform-SpecificNetworkingTechnologies.html

[html] view plaincopyprint?在CODE上查看代码片派生到我的代码片
  1. Register for Captive Network Support  
  2.   
  3. A captive network is a Wi-Fi network that doesn’t provide Internet access until the user performs some   
  4. action, such as logging in, specifying payment, or agreeing to terms and conditions. Captive networks   
  5. common in public areas, such as airports and hotels.  
  6.   
  7. When a user joins a captive network, Captive Network Support typically provides a web sheet that allows   
  8. the user to authenticate with the network. If your application registers the SSID of the captive network,   
  9. however, the web sheet is suppressed, and the user can complete authentication in your application.  
  10.   
  11. For more information, read CaptiveNetwork Reference  



https://developer.apple.com/library/ios/documentation/SystemConfiguration/Reference/CaptiveNetworkRef/Reference/reference.html#//apple_ref/doc/uid/TP40009770-CH101-DontLinkElementID_4

[html] view plaincopyprint?在CODE上查看代码片派生到我的代码片
  1. Overview  
  2.   
  3. The CaptiveNetwork programming interface allows an application to interact with Captive Network Support,   
  4. the system component responsible for detecting networks that require user interaction before providing   
  5. internet access. These networks are most commonly WiFi hotspots in public locations such as airports   
  6. and hotels.  
  7.   
  8. By calling the CNSetSupportedSSIDs function, an application can register a list of wireless network   
  9. SSIDs with Captive Network Support, thereby assuming responsibility for authenticating with those   
  10. networks. Typically when a user joins a captive network, Captive Network Support provides a web   
  11. sheet that allows the user to authenticate with the network. If an application has registered the   
  12. SSID of the captive network, however, the web sheet is suppressed, and the user can complete   
  13. authentication in the appropriate application.  
  14.   
  15. After a user performs authentication in the application that registered the SSID, the application   
  16. should inform Captive Network Support of the result of the authentication with either the   
  17. CNMarkPortalOnline function or the CNMarkPortalOffline function 
0 0
原创粉丝点击