Zone Director External Landing Page Variables

  • 2
  • Question
  • Updated 4 years ago
I posted this topic a while back but I must not have been very clear.

I am using a hotspot service to host a landing page for my Zone Director. I have the username and password fields but I also require fields for success pages (post authentication pages) and failure pages (when authentication fails I need to redirect back to the initial page with all the variables in the url).

Is there a Zone Director API for creating landing pages for Zone Directors?

Thanks.
Photo of Allan Libby

Allan Libby

  • 2 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 2
Photo of Sid Sok

Sid Sok, Official Rep

  • 102 Posts
  • 48 Reply Likes
Hi Allan,

I am not sure I completely understand your situation. From what I read, you have setup hotspot service and the initial redirect works and the external web site is asking for a username and password, which will be put in as part of a post back to the ZD for authentication purposes and if the user enters the correct username and password, all works well.

is my above understanding correct?

If that is the case then a failed username/password auth request will keep the client in question in an "Unauthorized" state and if and when the client request web access again it will be pushed to the external web site again and again until it is successful.
Photo of Allan Libby

Allan Libby

  • 2 Posts
  • 0 Reply Likes
When I use Nomadix and HP controllers they each have variables I use in my POST in a form that directs the controller for post auth success and failure states. I can set the post auth redirect page in the ZD but I need it set programatically in my page. I also need to set the fail page because the ZD seems to lose the variables in my URL.
Photo of Sid Sok

Sid Sok, Official Rep

  • 102 Posts
  • 48 Reply Likes
Here is a sample source page:

<html>
<head>
<title>Wireless Internet Service</title>
<script type="text/javascript">
function get_param(name)
{
if (location.href.indexOf("?") >= 0) {
var query=location.href.split("?")[1];
var params=query.split("&");
for (var i = 0; i < params.length; i ++) {
value_pair=params[i].split("=");
if (value_pair[0] == name)
return unescape(value_pair[1]);
}
}
return "";
}
</script>
</head>
<body>
<center>
<h2>Wireless Internet Service</h2>
<script type="text/javascript">
document.write('<form method=POST action="http://' + get_param("sip") + ':9997/login">');
</script>
Username:<input type="text" name="username">
Password:<input type="password" name="password" >
<input type="submit" value="Login">
</form>
</center>
</body>
</html>
Photo of Arjan Vos

Arjan Vos

  • 1 Post
  • 1 Reply Like
Allan,

you can specify the redirect url for succes by setting the variable "url" in your POST. (For example in a hidden input field for your form)
In this case you need to turn on the redirect to the users intended page.
The users intended page is then sent within the variables the ZD sends to your portal.
If you then ignore the variable and set it staticly in the form, then, if authenticated, the user is redirected to the page you've set there.

Upon failure, the user is sent back to your portal.
You can catch the variables by using javascript getvariable or a simpel GET in html/PHP and add them to the end of the portal url.