Security

Reply
Frequent Contributor I

Clearpass login countdown timer

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?

 


Accepted Solutions
Highlighted

Re: Clearpass login countdown timer

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.

View solution in original post


All Replies
Highlighted

Re: Clearpass login countdown timer

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.

View solution in original post

Highlighted
Frequent Contributor I

Re: Clearpass login countdown timer

Great.

 

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

 

Thanks.

Highlighted
Frequent Contributor I

Re: Clearpass login countdown timer

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?

Highlighted

Re: Clearpass login countdown timer

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};

Highlighted

Re: Clearpass login countdown timer

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.

Highlighted
Frequent Contributor I

Re: Clearpass login countdown timer

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.

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: