include EDS without displaying

Peter Schober peter.schober at univie.ac.at
Fri Mar 1 03:04:21 EST 2013


I wanted to integrate the EDS within an application that has a shared
header (and footer) for all pages and only changes the body of the
page depending on authentication status (i.e., the URL for the app
never changes for discovery or whether I'm logged in or not).

When I include the necessary Javascript in the header to load the EDS
(so it's always loaded as part of the app) and complete authentication
I obviously don't want to include <div id="idpSelect"/></div> as part
of the application as I'm already authenticated.

But when I load the EDS and not display it it (by inclusion of the div
element) it complains about that very fact in a pop up window
(fatal.divMissing). Is that something I can tune in the EDS, or
something you consider adding?

I've worked around the issue by moving discovery outside the app to
its own URL on the same server, sharing the UI as much as possible.
Then by removing he check from idpselect.js
  aw=document.getElementById(az.insertAtDiv);if(!aw){H(w("fatal.divMissing"));return}
Finally by hackery inside the application (basically:
if !$REMOTE_USER include Javascript).
I suppose I could also be using jquery to load the JS later via
$(document).ready() (as compared to always loading if from the HTML
head) when I actually need to show the EDS.
Or maybe always include the div (to satisfy the check) but set
display:none dynamically from Javascript or something?

Anyway, a switch to just turn off that complaint would be a lot
easier (and less intrusive) than any of the workarounds.
-peter


More information about the dev mailing list