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:
commit
5281793078
1 changed files with 5 additions and 0 deletions
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in a new issue