disco: fix cookie error in simple-disco-store

This commit is contained in:
Thomas NOËL 2012-07-12 11:00:57 +02:00
parent f3c6826d05
commit 65c5cf66c1
1 changed files with 2 additions and 3 deletions

View File

@ -14,7 +14,7 @@
var C_RETURNIDPARAM = "returnIDParam";
var C_IS_PASSIVE = "isPassive";
var C_IDP_ENTITY_ID = "IdPentityID";
var COOKIE_TIMEOUT_DAYS = 730;
var COOKIE_TIMEOUT_DAYS = 730; // 2 years
var qs = $.parseQuerystring();
var entity_id = qs[C_ENTITY_ID];
@ -28,14 +28,13 @@
if (C_IDP_ENTITY_ID in qs) {
idp_entity_id = qs[C_IDP_ENTITY_ID];
debug_alert('set idp to ' + idp_entity_id);
$.cookie(C_IDP_ENTITY_ID, qs[C_IDP_ENTITY_ID], { expires: COOKIE_TIMEOUT_DAYS });
} else {
idp_entity_id = $.cookie(C_IDP_ENTITY_ID);
}
function response() {
debug_alert('query by ' + entity_id);
if (idp_entity_id) {
$.cookie(C_IDP_ENTITY_ID, qs[C_IDP_ENTITY_ID], { expires: COOKIE_TIMEOUT_DAYS });
$.cookie(C_IDP_ENTITY_ID, idp_entity_id, { expires: COOKIE_TIMEOUT_DAYS });
if (return_url.indexOf('?') == -1) {
return_url = return_url + '?';
} else {