Merge remote branch 'upstream/master'
[mono.git] / mcs / class / System / System.Net / AuthenticationManager.cs
index 5afc54bcaceef7cc5067eff610f6e56140620eee..876418bbc6f7f61fa17f2f0ed2949971330227c6 100644 (file)
 //
 
 using System.Collections;
+using System.Collections.Specialized;
 using System.Configuration;
-#if NET_2_0
 using System.Net.Configuration;
-using System.Collections.Specialized;
-#endif
 
 namespace System.Net
 {
-       public class AuthenticationManager
-       {
+#if MOONLIGHT
+       internal class AuthenticationManager {
+#else
+       public class AuthenticationManager {
+#endif
                static ArrayList modules;
                static object locker = new object ();
 
@@ -54,8 +55,11 @@ namespace System.Net
                                        return;
                                
                                modules = new ArrayList ();
-#if !MONOTOUCH
-#if NET_2_0 && CONFIGURATION_DEP
+#if NET_2_1
+                               modules.Add (new BasicClient ());
+                               modules.Add (new DigestClient ());
+                               modules.Add (new NtlmClient ());
+#elif NET_2_0 && CONFIGURATION_DEP
                                object cfg = ConfigurationManager.GetSection ("system.net/authenticationModules");
                                AuthenticationModulesSection s = cfg as AuthenticationModulesSection;
                                if (s != null) {
@@ -70,12 +74,10 @@ namespace System.Net
                                }
 #else
                                ConfigurationSettings.GetConfig ("system.net/authenticationModules");
-#endif
 #endif
                        }
                }
                
-#if NET_2_0
                static ICredentialPolicy credential_policy = null;
                
                public static ICredentialPolicy CredentialPolicy
@@ -100,7 +102,6 @@ namespace System.Net
                                throw GetMustImplement ();
                        }
                }
-#endif
 
                public static IEnumerator RegisteredModules {
                        get {