KEYCLOAK-895 Document polyfillers for IE9 compatibility in keycloak.js

This commit is contained in:
Stian Thorgersen 2014-12-17 12:15:22 +01:00
parent ee62f5b1a1
commit 2030ab159d

View file

@ -1,17 +1,15 @@
<section id="javascript-adapter"> <section id="javascript-adapter">
<title>Pure Client Javascript Adapter</title> <title>Javascript Adapter</title>
<para> <para>
The Keycloak Server comes with a Javascript library you can use to secure pure HTML/Javascript applications. This The Keycloak Server comes with a Javascript library you can use to secure HTML/Javascript applications. This
library is referencable directly from the keycloak server. You can also download the adapter from Keycloak's download library is referencable directly from the keycloak server. You can also download the adapter from Keycloak's download
site if you want a static copy of this library. It site if you want a static copy of this library. It
works in the same way as other application adapters except that your browser is driving the OAuth redirect protocol works in the same way as other application adapters except that your browser is driving the OAuth redirect protocol
rather than the server. rather than the server.
</para> </para>
<para> <para>
The The disadvantage of using this approach is that you have a non-confidential, public client. This makes it more
disadvantage of using this approach is that you end up having a non-confidential, public client. This can be mitigated important that you register valid redirect URLs and make sure your domain name is secured.
by registering valid redirect URLs. You are still vulnerable if somebody hijacks the IP/DNS name of your pure
HTML/Javascript application though.
</para> </para>
<para> <para>
To use this adapter, you must first configure an application (or client) through the <literal>Keycloak Admin Console</literal>. To use this adapter, you must first configure an application (or client) through the <literal>Keycloak Admin Console</literal>.
@ -138,6 +136,21 @@ keycloak.updateToken(30).success(function() {
</para> </para>
</section> </section>
<section>
<title>Older browsers</title>
<para>
The JavaScript adapter depends on Base64 (window.btoa and window.atob) and HTML5 History API. If you need to
support browsers that don't provide those (for example IE9) you'll need to add polyfillers. Example polyfill
libraries:
<itemizedlist>
<listitem>Base64 - <ulink url="https://github.com/davidchambers/Base64.js">https://github.com/davidchambers/Base64.js</ulink></listitem>
<listitem>HTML5 History - <ulink url="https://github.com/devote/HTML5-History-API">https://github.com/devote/HTML5-History-API</ulink></listitem>
</itemizedlist>
</para>
</section>
<section> <section>
<title>JavaScript Adapter reference</title> <title>JavaScript Adapter reference</title>