Skip to content
Snippets Groups Projects
Commit 67486abb authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

The DiscoJuice AJAX request for metadata now contains the entityID of the service

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2841 44740490-163a-0410-bde0-09ae8108e29a
parent 6634a2a8
No related branches found
No related tags found
No related merge requests found
...@@ -34,11 +34,19 @@ DiscoJuice.Control = { ...@@ -34,11 +34,19 @@ DiscoJuice.Control = {
var that = this; var that = this;
if (this.data) return; if (this.data) return;
var metadataurl = this.parent.Utils.options.get('metadata'); var metadataurl = this.parent.Utils.options.get('metadata');
var parameters = {};
this.parent.Utils.log('metadataurl is ' + metadataurl); this.parent.Utils.log('metadataurl is ' + metadataurl);
if (!metadataurl) return; if (!metadataurl) return;
// If SP EntityID is set in configuration make sure it is sent as a parameter
// to the feed endpoint.
var discosettings = this.parent.Utils.options.get('disco');
if (discosettings) {
parameters.entityID = discosettings.spentityid;
}
$.getJSON(metadataurl, function(data) { $.getJSON(metadataurl, parameters, function(data) {
that.data = data; that.data = data;
that.parent.Utils.log('Successfully loaded metadata (' + data.length + ')'); that.parent.Utils.log('Successfully loaded metadata (' + data.length + ')');
that.postLoad(); that.postLoad();
...@@ -508,6 +516,8 @@ DiscoJuice.Control = { ...@@ -508,6 +516,8 @@ DiscoJuice.Control = {
iframeurl = writableStore + '?entityID=' + escape(spentityid) + '&IdPentityID=' + iframeurl = writableStore + '?entityID=' + escape(spentityid) + '&IdPentityID=' +
escape(entityID) + '&isPassive=true&returnIDParam=bogus&return=' + escape(returnurl); escape(entityID) + '&isPassive=true&returnIDParam=bogus&return=' + escape(returnurl);
this.parent.Utils.log('DiscoJuice.Control discoWrite iframeURL (' + iframeurl + ') ');
html = '<iframe src="' + iframeurl + '" style="display: none"></iframe>'; html = '<iframe src="' + iframeurl + '" style="display: none"></iframe>';
this.ui.addContent(html); this.ui.addContent(html);
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment