AAA, NAC, Guest Access & BYOD

How to define count down before redirectiing user/client to original URL?

This article helps you to display a count down timer in the welcome page before redirecting the user/client devices to originally requested URL after the successful login.

 

Environment : Applicable to all ClearPass Guest versions.

 

It is assumed that you have already configured a successful integration between Aruba Controller and ClearPass Guest. The below are the additional steps to display the count down timer before redirecting the guest users to originally requested URL.

With the default Aruba Controller's captive portal configuration, the "Show welcome page" option will redirect the users to originally requested URL. But in this case we will be creating a custom welcome page in ClearPass Guest and mapping the custom page under the controller's captive portal profile as welcome page.


Step 1: ClearPass Guest configuration.

Creating a custom welcome page. Go to ClearPass Guest >> Configuration >> (Pages) >> Web Logins >> Create a new web login.

 

rtaImage.png

 

The above page is named as "welcome_page".

Ensure to mark the check box "Provide a custom login form".

Add the below javascript in the Header HTML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="refresh" content="10; URL={$extra_fields.url|escape}">
<title>JavaScript 10 Seconds Countdown</title>
<script language="javascript">{literal}
var max_time = 10;
var cinterval;
function countdown_timer(){
  // decrease timer
  max_time--;
  document.getElementById('countdown').innerHTML = max_time;
  if(max_time == 0){
    clearInterval(cinterval);
  }
}
// 1,000 means 1 second.
cinterval = setInterval('countdown_timer()', 1000);
{/literal}</script>
</head>
 <body>
<p>Redirecting you to <a href="{$extra_fields.url|escape}"> {$extra_fields.url|escape}</a> in <span id="countdown">5</span> seconds.</p>
</body>
</html>

 

rtaImage (1).png

 

The above code will count/pause for 10 seconds before redirecting to the Original URL.

Step 2: Controller Configuration.

The custom page created in the ClearPass Guest should be mapped under the Controller >> Configuration >>Security >> Authentication >> L3 Authentication >> Captive Portal Authentication Profile >> Welcome page.

The URL format will be https://<ClearPass IP address or FQDN>/guest/welcome_page.php

 

rtaImage (2).png

 

Use cases:
1. This article will be helpful when you are facing issue with redirecting the users to originally requested URL after the authentication.
2. This article will be helpful when the customer comes up with a requirement to display their branded/custom page before redirecting to the originally requested URL.

Please find below the sample output of the welcome page with count down.

 

rtaImage (3).png

Version history
Revision #:
1 of 1
Last update:
‎04-08-2015 07:42 AM
Updated by:
 
Labels (1)
Contributors
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.