diff --git a/examples/cordova/www/index.html b/examples/cordova/www/index.html index 9983ee856a..a11ab24ad8 100644 --- a/examples/cordova/www/index.html +++ b/examples/cordova/www/index.html @@ -18,9 +18,11 @@ document.getElementById('not-authenticated').style.display = 'none'; document.getElementById('subject').innerText = keycloak.subject; - document.getElementById('username').innerText = keycloak.idToken.preferred_username; + document.getElementById('username').innerText = keycloak.idTokenParsed.preferred_username; document.getElementById('tokenExpires').innerText = new Date(keycloak.tokenParsed.exp * 1000).toLocaleString(); document.getElementById('tokenRefreshExpires').innerText = new Date(keycloak.refreshTokenParsed.exp * 1000).toLocaleString(); + document.getElementById('token').innerText = JSON.stringify(keycloak.tokenParsed, null, ' '); + document.getElementById('idToken').innerText = JSON.stringify(keycloak.idTokenParsed, null, ' '); } else { document.getElementById('authenticated').style.display = 'none'; document.getElementById('not-authenticated').style.display = 'block'; @@ -31,6 +33,15 @@ keycloak.init({ onLoad: 'check-sso' }).success(updateState); }, false); +