Merge pull request #474 from mposolda/beta-3-testing

fix javascript error when click on 'Show Expires' and token is not activ...
This commit is contained in:
Stian Thorgersen 2014-06-18 17:11:49 +01:00
commit 5281793078

View file

@ -48,6 +48,11 @@
}
function showExpires() {
if (!keycloak.tokenParsed) {
output("Not authenticated");
return;
}
var o = 'Token Expires:\t\t' + new Date(keycloak.tokenParsed.exp * 1000).toLocaleString() + '\n';
o += 'Token Expires in:\t' + Math.round(keycloak.tokenParsed.exp - new Date().getTime() / 1000) + ' seconds\n';