Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Clearpass login countdown timer

This thread has been viewed 10 times
  • 1.  Clearpass login countdown timer

    Posted Oct 02, 2019 10:28 AM

    I have a guest workflow with guest. With that, I am including a login delay to make sure the publisher has time to create the account before the login. 

     

    On the page that says "Please wait while you are logged in." How would I be able to set a countdown timer equal to the login delay that I have specified in the guest self-registration so users don't try to back out before they are logged in?

     



  • 2.  RE: Clearpass login countdown timer
    Best Answer

    EMPLOYEE
    Posted Oct 02, 2019 02:18 PM

    I believe for Server-Initiated logins we display a countdown timer already.  For the normal controller-based POST we do not.

     

    You are free to search for any type of JavaScript countdown.  The delay itself can be inserted dynamically with {$_wl.login_delay} in your script.



  • 3.  RE: Clearpass login countdown timer

    Posted Oct 02, 2019 02:23 PM

    Great.

     

    I have a countdown timer scripted, but will use the {$_wl.login_delay} to script it dynamically.

     

    Thanks.



  • 4.  RE: Clearpass login countdown timer

    Posted Oct 03, 2019 11:22 AM

    I tried adding this to my countdown script but wasn't able to get it working.

     

    {literal}
    <script type="text/javascript">
    var timeleft = {$_wl.login_delay};
    var downloadTimer = setInterval(function(){
    timeleft--;
    document.getElementById("countdowntimer").textContent = timeleft;
    if(timeleft <= 0)
    clearInterval(downloadTimer);
    },1000);
    </script>
    {/literal}

     

    Usually I hardcode timeleft to the match my login delay. But doing this doesn't work. I have this in my Login Message window. Dumping this variable doesn't give me anything. What would you suggest?



  • 5.  RE: Clearpass login countdown timer

    EMPLOYEE
    Posted Oct 03, 2019 01:35 PM

    You are probably wrapping you entire script in {literal} tags to bypass our scripting as I see you have bare '{' and '}' in there.

     

    Try:

     

    var timeleft ={/literal}{$_wl.login_delay}{literal};



  • 6.  RE: Clearpass login countdown timer

    EMPLOYEE
    Posted Oct 03, 2019 01:36 PM

    I am blind as yes, the literal were literally right there.  Follow my example or move the wrapper around your if conditional.  The only thing that needs them are the { and } in your script.  The rest would have been fine bare.



  • 7.  RE: Clearpass login countdown timer

    Posted Oct 03, 2019 09:50 PM

    That worked perfecty. I wish some of this stuff was better documented. A lot of these inner workings of clearpass stuff is not easy to find information on.