Remove iframe version detection from Keycloak JS (#33101)
Closes #33100 Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
e065070751
commit
aa9e6c730e
1 changed files with 2 additions and 17 deletions
|
@ -39,13 +39,6 @@ function Keycloak (config) {
|
||||||
|
|
||||||
kc.didInitialize = false;
|
kc.didInitialize = false;
|
||||||
|
|
||||||
var scripts = document.getElementsByTagName('script');
|
|
||||||
for (var i = 0; i < scripts.length; i++) {
|
|
||||||
if ((scripts[i].src.indexOf('keycloak.js') !== -1 || scripts[i].src.indexOf('keycloak.min.js') !== -1) && scripts[i].src.indexOf('version=') !== -1) {
|
|
||||||
kc.iframeVersion = scripts[i].src.substring(scripts[i].src.indexOf('version=') + 8).split('&')[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var useNonce = true;
|
var useNonce = true;
|
||||||
var logInfo = createLogger(console.info);
|
var logInfo = createLogger(console.info);
|
||||||
var logWarn = createLogger(console.warn);
|
var logWarn = createLogger(console.warn);
|
||||||
|
@ -847,18 +840,10 @@ function Keycloak (config) {
|
||||||
return getRealmUrl() + '/protocol/openid-connect/logout';
|
return getRealmUrl() + '/protocol/openid-connect/logout';
|
||||||
},
|
},
|
||||||
checkSessionIframe: function() {
|
checkSessionIframe: function() {
|
||||||
var src = getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';
|
return getRealmUrl() + '/protocol/openid-connect/login-status-iframe.html';
|
||||||
if (kc.iframeVersion) {
|
|
||||||
src = src + '?version=' + kc.iframeVersion;
|
|
||||||
}
|
|
||||||
return src;
|
|
||||||
},
|
},
|
||||||
thirdPartyCookiesIframe: function() {
|
thirdPartyCookiesIframe: function() {
|
||||||
var src = getRealmUrl() + '/protocol/openid-connect/3p-cookies/step1.html';
|
return getRealmUrl() + '/protocol/openid-connect/3p-cookies/step1.html';
|
||||||
if (kc.iframeVersion) {
|
|
||||||
src = src + '?version=' + kc.iframeVersion;
|
|
||||||
}
|
|
||||||
return src;
|
|
||||||
},
|
},
|
||||||
register: function() {
|
register: function() {
|
||||||
return getRealmUrl() + '/protocol/openid-connect/registrations';
|
return getRealmUrl() + '/protocol/openid-connect/registrations';
|
||||||
|
|
Loading…
Reference in a new issue