summaryrefslogtreecommitdiffstats
path: root/virtualenv/pffedportal
diff options
context:
space:
mode:
authorThomas NOEL <tnoel@entrouvert.com>2012-07-11 21:41:19 (GMT)
committerThomas NOEL <tnoel@entrouvert.com>2012-07-11 21:41:19 (GMT)
commitf3c6826d05c13b94ab72a324713e72bd3d04f5b9 (patch)
tree2ad8f543474748cf8f9b53d75b0e16d7ab40a7a9 /virtualenv/pffedportal
parent6f399c6407f0a282b1c4a034c5906b728c790334 (diff)
downloadunivnautes-old-f3c6826d05c13b94ab72a324713e72bd3d04f5b9.zip
univnautes-old-f3c6826d05c13b94ab72a324713e72bd3d04f5b9.tar.gz
univnautes-old-f3c6826d05c13b94ab72a324713e72bd3d04f5b9.tar.bz2
disco: update simple-disco-store
Diffstat (limited to 'virtualenv/pffedportal')
-rw-r--r--virtualenv/pffedportal/media/simple-disco-store/discoquery.js13
-rwxr-xr-x[-rw-r--r--]virtualenv/pffedportal/media/simple-disco-store/jquery-1.7.2.min.js0
-rw-r--r--virtualenv/pffedportal/media/simple-disco-store/response.html4
-rw-r--r--virtualenv/pffedportal/media/simple-disco-store/test.html14
-rw-r--r--virtualenv/pffedportal/templates/login0.html13
5 files changed, 29 insertions, 15 deletions
diff --git a/virtualenv/pffedportal/media/simple-disco-store/discoquery.js b/virtualenv/pffedportal/media/simple-disco-store/discoquery.js
index 2964609..39a858c 100644
--- a/virtualenv/pffedportal/media/simple-disco-store/discoquery.js
+++ b/virtualenv/pffedportal/media/simple-disco-store/discoquery.js
@@ -5,6 +5,7 @@
var C_RETURNIDPARAM = "returnIDParam";
var C_IS_PASSIVE = "isPassive";
var C_IDP_ENTITY_ID = "IdPentityID";
+ var C_STORE = "store";
var COOKIE_TIMEOUT_DAYS = 730;
$.disco_query = function (entity_id, url, response_url, callback) {
@@ -17,14 +18,14 @@
}
var param = {};
param[C_ENTITY_ID] = entity_id;
- param[C_RETURN] = response_url;
+ param[C_RETURN] = response_url + '?' + C_STORE + '=' + escape(url);
param[C_IS_PASSIVE] = 'true';
query_url = query_url + $.param(param);
debug_alert('query_url '+query_url);
iframe.attr('src', query_url);
if (callback) {
- var disco_callback = function (entity_id, auth) {
- callback(entity_id, auth);
+ var disco_callback = function (entity_id, store, auth) {
+ callback(entity_id, store, auth);
$(iframe).remove();
};
window.disco_callback = disco_callback;
@@ -43,14 +44,14 @@
}
var param = {};
param[C_ENTITY_ID] = entity_id;
- param[C_RETURN] = response_url;
+ param[C_RETURN] = response_url + '?' + C_STORE + '=' + escape(url);
param[C_IDP_ENTITY_ID] = idp_entity_id;
query_url = query_url + $.param(param);
debug_alert('query_url '+query_url);
iframe.attr('src', query_url);
if (callback) {
- var disco_callback = function (entity_id, auth) {
- callback(entity_id, auth);
+ var disco_callback = function (entity_id, store, auth) {
+ callback(entity_id, store, auth);
$(iframe).remove();
};
window.disco_callback = disco_callback;
diff --git a/virtualenv/pffedportal/media/simple-disco-store/jquery-1.7.2.min.js b/virtualenv/pffedportal/media/simple-disco-store/jquery-1.7.2.min.js
index 16ad06c..16ad06c 100644..100755
--- a/virtualenv/pffedportal/media/simple-disco-store/jquery-1.7.2.min.js
+++ b/virtualenv/pffedportal/media/simple-disco-store/jquery-1.7.2.min.js
diff --git a/virtualenv/pffedportal/media/simple-disco-store/response.html b/virtualenv/pffedportal/media/simple-disco-store/response.html
index 006276f..e659543 100644
--- a/virtualenv/pffedportal/media/simple-disco-store/response.html
+++ b/virtualenv/pffedportal/media/simple-disco-store/response.html
@@ -11,13 +11,15 @@
<script>
var C_ENTITY_ID = "entityID";
var C_AUTH = "auth";
+ var C_STORE = "store";
var qs = $.parseQuerystring();
+ var store = qs[C_STORE];
var auth = qs[C_AUTH];
var entity_id = qs[C_ENTITY_ID];
debug_alert(window.location.search + ' received ' + entity_id + ' + auth ' + auth);
if (entity_id && parent.disco_callback) {
- parent.disco_callback(entity_id, auth);
+ parent.disco_callback(entity_id, store, auth);
}
</script>
</body>
diff --git a/virtualenv/pffedportal/media/simple-disco-store/test.html b/virtualenv/pffedportal/media/simple-disco-store/test.html
index 33c60a9..015a809 100644
--- a/virtualenv/pffedportal/media/simple-disco-store/test.html
+++ b/virtualenv/pffedportal/media/simple-disco-store/test.html
@@ -9,12 +9,18 @@
<body>
<script>
function query() {
- $.disco_query("coucou", "./store.html", "./response.html", function (entity_id, auth) {
- alert("idp is " + entity_id); });
+ $.disco_query("coucou", "./store.html", "./response.html",
+ function (entity_id, store, auth) {
+ alert("idp is " + entity_id + " said " + store);
+ }
+ );
}
function set() {
- $.disco_set("coucou", $('#idp').val(), "./store.html", "./response.html", function (entity_id, auth) {
- alert("idp has been set to " + entity_id); });
+ $.disco_set("coucou", $('#idp').val(), "./store.html", "./response.html",
+ function (entity_id, store, auth) {
+ alert("idp has been set to " + entity_id + " on " + store);
+ }
+ );
}
</script>
<div>
diff --git a/virtualenv/pffedportal/templates/login0.html b/virtualenv/pffedportal/templates/login0.html
index 630fe4a..d43f467 100644
--- a/virtualenv/pffedportal/templates/login0.html
+++ b/virtualenv/pffedportal/templates/login0.html
@@ -57,9 +57,14 @@ Choisissez votre établissement&nbsp;:<br /><br />
"https://{{https_hostname}}/authsaml2/metadata",
"https://{{https_hostname}}{{ MEDIA_URL }}simple-disco-store/store.html",
"https://{{https_hostname}}{{ MEDIA_URL }}simple-disco-store/response.html",
- function (entity_id, auth) {
+ function (entity_id, store, auth) {
$('a#default-idp').text("entity_id : " + entity_id);
- alert("query " + entity_id);
+ $('a#default-idp').attr({
+ href: "/sso?entity_id=" + entity_id,
+ title: "Entity ID = " + entity_id,
+ style: "",
+ });
+ alert("query: receive " + entity_id + " from " + store);
});
}
@@ -69,8 +74,8 @@ Choisissez votre établissement&nbsp;:<br /><br />
idp_entity_id,
"https://{{https_hostname}}{{ MEDIA_URL }}simple-disco-store/store.html",
"https://{{https_hostname}}{{ MEDIA_URL }}simple-disco-store/response.html",
- function (entity_id, auth) {
- // alert("set " + entity_id);
+ function (entity_id, store, auth) {
+ alert("set: store " + entity_id + " on " + store);
});
}