Author: keith
Date: Wed Jun  4 01:36:45 2008
New Revision: 17897
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=17897

Log:
Adding exception handling when an incorrect password or username for http badic 
auth is provided


Modified:
   trunk/mashup/java/modules/www/js/mashup-utils.js

Modified: trunk/mashup/java/modules/www/js/mashup-utils.js
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/js/mashup-utils.js?rev=17897&r1=17896&r2=17897&view=diff
==============================================================================
--- trunk/mashup/java/modules/www/js/mashup-utils.js    (original)
+++ trunk/mashup/java/modules/www/js/mashup-utils.js    Wed Jun  4 01:36:45 2008
@@ -246,9 +246,14 @@
             this.params.innerHTML =
             "Failed to share the service. Please refer to system admin for 
more details.";
         } else if (error.reason.indexOf("Transport error: 401 Error: 
Authorization Required") > -1) {
-            WSO2.MashupUtils.dialog.close();
-            
WSO2.MashupUtils.showMashupSharingWithHTTPBasicAuthDialog(serviceName, 
localUserName,
+            if (document.getElementById("txtBasicAuthUsername") != null) {
+                var labelElement = document.getElementById("lblStatus");
+                labelElement.innerHTML = "Credentials provided for HTTP Basic 
Authentication are incorrect. PLease reenter your username and password."
+            } else {
+                WSO2.MashupUtils.dialog.close();
+                
WSO2.MashupUtils.showMashupSharingWithHTTPBasicAuthDialog(serviceName, 
localUserName,
                     mode, destAddress, destUsername, destPassword, 
overwriteExisting, migrateTags);
+            }
         } else if (error.reason.indexOf("Access Denied. Please login first") > 
-1) {
             wso2.wsf.Util.alertMessage("Your session has expired.");
                 //Envoking force logout
@@ -799,7 +804,7 @@
         '<td height="24" ><table width="100%" height="24" border="0" 
cellspacing="0" cellpadding="0">' +
         '<tr height="24">' +
         '<td width="18" height="24"><img 
src="images/w_small_top_left_edit.gif" width="18" height="24"></td>' +
-        '<td class="diaLogTitle" height="24">' + strTitle + '</td>' +
+        '<td class="diaLogTitle" height="24" id="d_Title">' + strTitle + 
'</td>' +
         '<td width="17" height="24" class="diaLogTitle"><img 
src="images/w_top_close.gif" style="cursor: pointer;" 
onclick="WSO2.MashupUtils.dialog.close()" width="17" height="16"></td>' +
         '<td width="9" height="24"><img src="images/w_top_right_edit.gif" 
width="9" height="24"></td>' +
         '</tr>' +

_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to