checkLoginIframe should just add promise to a list and send the message if
there's not a request already in progress. messageCallback should then
invoke all promises in the list.
On 14 October 2016 at 14:19, Sebastien Blanc <sblanc(a)redhat.com> wrote:
Hi,
I started to look at
https://issues.jboss.org/browse/KEYCLOAK-3625 . The
fix is to send back a String containing just "changed" or "unchanged"
from
the iframe to the main window, instead of a whole JSON like we do now.
Most of the refactoring is doable but there is one point on which I'm
really stuck :
The JS library maintain a callBack map that contains promises, the key is a
ID that we generate and that we pass to the iframe. When the iframe sends
back a message to the main Window it passes also the ID, so that we can
retrieve the correct promise to resolve it (or not).
But now since we return just a String, I don't know how we can retrieve the
correct promise from the callBack map.
Does anyone have an idea ?
Sebi
_______________________________________________
keycloak-dev mailing list
keycloak-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-dev