Eric Fazendin
unread,May 10, 2010, 10:33:56 PM5/10/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to PingPong IdP Discovery
As the question has come up, I thought I would post an example of what
the javascript looks like that the Service Provider would have on
their PingPong IdP Discovery page. Let me know if you have any
questions:
This example is using jquery:
//------Start-----
function getStatus() {
$.ajax({
url: "PongStatus",
success: function(data) {parseStatus(data);}
});
}
function parseStatus(data) {
$('.pongStatus').html(data);
if (data == "next page") {
if ((page * idpsPerPage) <= totalNumberOfIdps) {
getPage();
setTimeout("getStatus()", 500);
}
} else if (data == "check back") {
setTimeout("getStatus()", 500);
} else {
//data=='no user idps' || data=='get idps'
stopTheAnimation = true;
$(".animatedContainer").fadeOut("fast", function () {
getIdps();
});
}
}
setTimeout("getStatus()", 500);
//-----End-----
The other key part not shown here are the iframes sending the Ping
request and redirecting the Pong responses back to the SP. The
getPage() is a function to make an AJAX call back to the SP to receive
the next set of iframes to load on the page. The getIdps() is a
function to make an AJAX call to retrieve and display the user's IdPs
or to display a complete list of IdPs if no IdPs were found for the
user.