diff --git a/securing_apps/topics/oidc/javascript-adapter.adoc b/securing_apps/topics/oidc/javascript-adapter.adoc index 575632655e..fa5598a470 100644 --- a/securing_apps/topics/oidc/javascript-adapter.adoc +++ b/securing_apps/topics/oidc/javascript-adapter.adoc @@ -83,9 +83,9 @@ It has no other task than sending the received tokens to the main application an ----
- + ---- @@ -467,11 +467,12 @@ For example: [source,javascript] ---- -keycloak.loadUserProfile().then(function(profile) { - alert(JSON.stringify(profile, null, " ")); -}).catch(function() { - alert('Failed to load user profile'); -}); +keycloak.loadUserProfile() + .then(function(profile) { + alert(JSON.stringify(profile, null, " ")) + }).catch(function() { + alert('Failed to load user profile'); + }); ---- ====== isTokenExpired(minValidity) @@ -489,15 +490,16 @@ For example: [source,javascript] ---- -keycloak.updateToken(5).then(function(refreshed) { - if (refreshed) { - alert('Token was successfully refreshed'); - } else { - alert('Token is still valid'); - } -}).catch(function() { - alert('Failed to refresh the token, or the session has expired'); -}); +keycloak.updateToken(5) + .then(function(refreshed) { + if (refreshed) { + alert('Token was successfully refreshed'); + } else { + alert('Token is still valid'); + } + }).catch(function() { + alert('Failed to refresh the token, or the session has expired'); + }); ---- ====== clearToken()