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

前言

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


验证问题

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


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

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


原理剖析

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

  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

  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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值