chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1482749 - /chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs
Date Wed, 15 May 2013 10:26:21 GMT
Author: fmui
Date: Wed May 15 10:26:21 2013
New Revision: 1482749

URL: http://svn.apache.org/r1482749
Log:
Improved Web Services NTML authentication

Modified:
    chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs?rev=1482749&r1=1482748&r2=1482749&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/binding-intf.cs Wed May 15 10:26:21 2013
@@ -247,7 +247,18 @@ namespace DotCMIS.Binding
                 htbe.AuthenticationScheme = AuthenticationSchemes.Negotiate;
 
                 clientCredentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Delegation;
-                clientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
+
+                string user = GetUser();
+                string password = GetPassword();
+
+                if ((user == string.Empty || user == null) && (password == string.Empty
|| password == null))
+                {
+                    clientCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
+                }
+                else
+                {
+                    clientCredentials.Windows.ClientCredential = new NetworkCredential(user,
password);
+                }
             }
         }
     }



Mime
View raw message