KEYCLOAK-1312 Add clearToken to keycloak.js

This commit is contained in:
Stian Thorgersen committed 2015-05-13 13:13:36 +02:00
1 parent 502efe42c9
commit dbf9525860
2 files changed
+29 -12

No files matched your search

@@ -305,6 +305,23 @@ keycloak.updateToken(5).success(function(refreshed) {
]]></programlisting>
</simplesect>
<simplesect>
<title>clearToken()</title>
<para>
Clear authentication state, including tokens. This can be useful if application has detected the session
has expired, for example if updating token fails. Invoking this results in onAuthLogout callback listener
being invoked.
</para>
<programlisting><![CDATA[
keycloak.updateToken(5).error(function() {
keycloak.clearToken();
});
]]></programlisting>
</simplesect>
</section>
<section>