Captive Portal Customizations - Venues

(Difference between revisions)
Jump to: navigation, search
(Created page with "== Description == Most Wi-Fi vendors provide the AP mac address, which allows the platform to identify the registered device and the associated venue. For vendors that do no...")
 
(Customization Example)
Line 7: Line 7:
 
== Customization Example ==
 
== Customization Example ==
  
Update your vendor configuration to add an extra "venue_name" (you can use any other value if necessary, e.g. "identity", "server_name", etc) query variable when redirecting to the Auth page. Also make sure that the value of this variable matches exactly the name of the venue configured in the Wi-Fi admin dashboard.
+
Update your vendor configuration to add an extra "venue_name" (you can use any other value if necessary, e.g. "identity", "server_name", etc) query variable when redirecting to the Auth page. Also make sure that the value of this variable matches exactly the name of the venue configured in the Wi-Fi admin dashboard, otherwise it will be necessary to update the customization below to perform an intermediary mapping between the value informed by the device and the venue name.
  
 
Then, replace the HTML Code for the "Auth Page" template with the following code:
 
Then, replace the HTML Code for the "Auth Page" template with the following code:

Revision as of 15:44, 19 October 2021

Description

Most Wi-Fi vendors provide the AP mac address, which allows the platform to identify the registered device and the associated venue.

For vendors that do not support this automatic flow you can build a custom one using the Wi-Fi Javascript APIs.

Customization Example

Update your vendor configuration to add an extra "venue_name" (you can use any other value if necessary, e.g. "identity", "server_name", etc) query variable when redirecting to the Auth page. Also make sure that the value of this variable matches exactly the name of the venue configured in the Wi-Fi admin dashboard, otherwise it will be necessary to update the customization below to perform an intermediary mapping between the value informed by the device and the venue name.

Then, replace the HTML Code for the "Auth Page" template with the following code:

 <script type="text/javascript">
   function setVenueFromQueryVariable(variable) {
     var api = new socialid.wifi.API(appConfig.path_name),
       venue = socialid.wifi.util.getQueryVariable(variable);
 
     if (venue) {
       api.setVenue(venue);
     }
   }
 
   // update "venue_name" to match the value configured in your vendor equipment.
   setVenueFromQueryVariable("venue_name");
 
   // original code
   redirectToLogin();
 </script>
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox