[fusion-commits] r2434 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Oct 4 11:32:02 EDT 2011
Author: jng
Date: 2011-10-04 08:32:02 -0700 (Tue, 04 Oct 2011)
New Revision: 2434
Modified:
trunk/lib/fusion.js
Log:
#105: If username and password query string parameters are found, pass them on to CreateSession.php
Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js 2011-10-04 13:36:29 UTC (rev 2433)
+++ trunk/lib/fusion.js 2011-10-04 15:32:02 UTC (rev 2434)
@@ -1504,9 +1504,16 @@
* Pre-create a session to avoid the 401 Unauthorized dialog
*
*/
- var createSessionId = function(){
+ var createSessionId = function(user, pass){
var xhr = getXmlHttpRequest();
- xhr.open("GET", Fusion.fusionURL+"layers/MapGuide/php/CreateSession.php",false);
+ var url = Fusion.fusionURL+"layers/MapGuide/php/CreateSession.php";
+ if (user != null && user != "")
+ {
+ url += "?username=" + user;
+ if (pass != null && pass != "")
+ url += "&password=" + pass;
+ }
+ xhr.open("GET", url, false);
xhr.send(null);
var o;
eval('o='+xhr.responseText);
@@ -1519,7 +1526,7 @@
appDefUrl.indexOf('Session') == 0)){
var passedSessionId = Fusion.getQueryParam('Session');
if(passedSessionId == null || passedSessionId == "" ){
- createSessionId();
+ createSessionId(Fusion.getQueryParam("Username"), Fusion.getQueryParam("Password"));
}else{
Fusion.sessionId = passedSessionId;
}
More information about the fusion-commits
mailing list