Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dealing with iOS Captive Network Support

Tags:

javascript

ios

So, I'm building a Guest Internet portal for a public hotspot in a hotel. This means the portal is served through a Network Access Gateway (a Nomadix) that redirects all outgoing traffic to the portal page. The portal needs to be able to set cookies on the browser so that Guests can be automatically logged back in after they idle timeout.

The Problem:
iOS4+ and OS X (10.7+) Devices have a feature called Captive Network Support. This feature continuously scans for Wifi SSIDs, connects to them, and curls http://www.apple.com/library/test/success.html to see if the device is connected to the internet. If it doesn't get the Success response, these devices pop open whats called a Captive Network Portal. This portal is not a true version of Safari Mobile and you cannot save cookies on this browser.

I would like an authoritative answer to the following question:

With client-side javascript/markup can I?

A) Save cookies within the Captive Network (popup) browser

B) Prevent the Captive Network browser from popping up in the first place without whitelisting apple.com

like image 851
meub Avatar asked Aug 28 '12 00:08

meub


1 Answers

This is kinda the wrong site in the StackExchange network for sysadmin stuff; you may wish to try ServerFault. In my experience as a user, there are WiFi portals out there that manage reauthentication without cookies; perhaps ServerFault can help you find such.

That said, there's one possible solution in terms of iOS client-side development: There are CaptiveNetwork APIs which allow a third-party app to inform the system that it's assumed responsibility for authenticating to particular SSIDs, suppressing the web sheet. It's likely not a desirable solution, since it requires your users to install an app, but it's there.

like image 140
rickster Avatar answered Sep 19 '22 16:09

rickster