Controller for cross-domain iframes added
This commit is contained in:
@ -31,10 +31,27 @@ $(document).ready(function(){
|
||||
'color': '#FFF'
|
||||
});
|
||||
if (data.CrossDomainLogin) {
|
||||
// Create iframes for other domains
|
||||
console.log('CrossDomainLogin initiated');
|
||||
// For reference:
|
||||
// [
|
||||
// "Result" => "Success",
|
||||
// "Location" => $originalUri,
|
||||
// "CrossDomainLogin" => $settings->Session['CrossDomainLogin'],
|
||||
// "CookieDomains" => json_encode(array_diff($settings->Session['CookieDomains'], $_SERVER['HTTP_HOST']))
|
||||
// ]);
|
||||
|
||||
var cookieDomains = json_decode(data.CookieDomains);
|
||||
console.log(data.CookieDomains);
|
||||
// let the client setup multiple iframes for all domains
|
||||
// psuedo-code: foreach (cookieDomains as domain) { $.get(domain, ref=[action,token])}
|
||||
|
||||
// validate each request against JWT-tokens in database
|
||||
// load all iframes parallel, show user progress and redirect once all iframes have finished loading; or after treshold of X ms has been reached
|
||||
// origin domain should be exempted from the treshold (because origin domain can be different from current domain -due to traefik design).
|
||||
|
||||
}
|
||||
console.log("Navigating to :" + data.Location);
|
||||
|
||||
// Finished (either succesfully or through timeout) cross-domain logins
|
||||
window.location.replace(data.Location);
|
||||
}, 2250);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user