Merge pull request #2628 from ilanddev/master

KEYCLOAK-2821 Add adapter option
This commit is contained in:
Stian Thorgersen 2016-04-14 13:23:11 +02:00
commit 2d9bb402fc

View file

@ -34,13 +34,18 @@
kc.init = function (initOptions) {
kc.authenticated = false;
if (window.Cordova) {
adapter = loadAdapter('cordova');
} else {
if (initOptions && initOptions.adapter === 'cordova') {
adapter = loadAdapter('cordova');
} else if (initOptions && initOptions.adapter === 'default') {
adapter = loadAdapter();
} else {
if (window.Cordova) {
adapter = loadAdapter('cordova');
} else {
adapter = loadAdapter();
}
}
if (initOptions) {
if (typeof initOptions.checkLoginIframe !== 'undefined') {
loginIframe.enable = initOptions.checkLoginIframe;