X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem%2FSystem.Net%2FAuthenticationManager.cs;h=876418bbc6f7f61fa17f2f0ed2949971330227c6;hb=8d373d7da5a91e52779e812e50324c87fad06d1b;hp=2206f537dbe78f79461394e75baf935fb887714a;hpb=c39d7ce9985a7067c1cbf44188007c9433901940;p=mono.git diff --git a/mcs/class/System/System.Net/AuthenticationManager.cs b/mcs/class/System/System.Net/AuthenticationManager.cs index 2206f537dbe..876418bbc6f 100644 --- a/mcs/class/System/System.Net/AuthenticationManager.cs +++ b/mcs/class/System/System.Net/AuthenticationManager.cs @@ -30,12 +30,17 @@ // using System.Collections; +using System.Collections.Specialized; using System.Configuration; +using System.Net.Configuration; namespace System.Net { - public class AuthenticationManager - { +#if MOONLIGHT + internal class AuthenticationManager { +#else + public class AuthenticationManager { +#endif static ArrayList modules; static object locker = new object (); @@ -50,10 +55,54 @@ namespace System.Net return; modules = new ArrayList (); +#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) { + 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 ();