//
using System.Collections;
+using System.Collections.Specialized;
using System.Configuration;
+using System.Net.Configuration;
namespace System.Net
{
- public class AuthenticationManager
- {
+ public class AuthenticationManager {
static ArrayList modules;
static object locker = new object ();
return;
modules = new ArrayList ();
+#if MOBILE
+ modules.Add (new NtlmClient ());
+ modules.Add (new DigestClient ());
+ modules.Add (new BasicClient ());
+#elif CONFIGURATION_DEP
+ object cfg = ConfigurationManager.GetSection ("system.net/authenticationModules");
+ AuthenticationModulesSection s = cfg as AuthenticationModulesSection;
+ if (s != null) {
+ foreach (AuthenticationModuleElement element in s.AuthenticationModules) {
+ IAuthenticationModule module = null;
+ try {
+ Type type = Type.GetType (element.Type, true);
+ module = (IAuthenticationModule) Activator.CreateInstance (type);
+ } catch {}
+ modules.Add (module);
+ }
+ }
+#else
ConfigurationSettings.GetConfig ("system.net/authenticationModules");
+#endif
+ }
+ }
+
+ static ICredentialPolicy credential_policy = null;
+
+ public static ICredentialPolicy CredentialPolicy
+ {
+ get {
+ return(credential_policy);
+ }
+ set {
+ credential_policy = value;
}
}
+ static Exception GetMustImplement ()
+ {
+ return new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static StringDictionary CustomTargetNameDictionary
+ {
+ get {
+ throw GetMustImplement ();
+ }
+ }
+
public static IEnumerator RegisteredModules {
get {
EnsureModules ();
}
}
+ [MonoTODO]
+ internal static bool OSSupportsExtendedProtection {
+ get {
+ return false;
+ }
+ }
+
internal static void Clear ()
{
EnsureModules ();
if (auth == null)
continue;
- auth.Module = mod;
+ auth.ModuleAuthenticationType = mod.AuthenticationType;
return auth;
}
}
if (auth == null)
continue;
- auth.Module = mod;
+ auth.ModuleAuthenticationType = mod.AuthenticationType;
return auth;
}
}