We need you! We're working hard on the next version of Developer Fusion -
Let us know what you think we should be up to!
-
Expand
Microsoft.Win32
-
Expand
Microsoft.Win32.SafeHandles
-
Expand
System
-
Expand
System.Runtime.Hosting
-
Expand
System.Runtime.InteropServices
-
Expand
System.Runtime.CompilerServices
-
Expand
System.Collections
-
Expand
System.Collections.Generic
-
Expand
System.Collections.ObjectModel
-
Expand
System.Configuration.Assemblies
-
Expand
System.Diagnostics
-
Expand
System.Diagnostics.CodeAnalysis
-
Expand
System.Diagnostics.SymbolStore
-
Expand
System.Globalization
-
Expand
System.IO
-
Expand
System.IO.IsolatedStorage
-
Expand
System.Reflection
-
Expand
System.Reflection.Cache
-
Expand
System.Reflection.Emit
-
Expand
System.Resources
-
Expand
System.Runtime
-
Expand
System.Runtime.InteropServices.Expando
-
Expand
System.Runtime.ConstrainedExecution
-
Expand
System.Runtime.Remoting.Activation
-
Expand
System.Runtime.Remoting.Messaging
-
Expand
System.Runtime.Remoting.Channels
-
Expand
System.Runtime.Remoting.Lifetime
-
Expand
System.Runtime.Remoting
-
Expand
System.Runtime.Remoting.Contexts
-
Expand
System.Runtime.Remoting.Proxies
-
Expand
System.Runtime.Remoting.Metadata
-
Expand
System.Runtime.Remoting.Metadata.W3cXsd2001
-
Expand
System.Runtime.Remoting.Services
-
Expand
System.Runtime.Serialization
-
Expand
System.Runtime.Serialization.Formatters
-
Expand
System.Runtime.Serialization.Formatters.Binary
-
Expand
System.Runtime.Versioning
-
Expand
System.Security
-
Expand
System.Security.Cryptography
-
Expand
System.Security.Cryptography.X509Certificates
-
Expand
System.Security.Permissions
-
Expand
System.Security.Policy
-
Expand
System.Security.Principal
-
Expand
System.Security.Util
-
Expand
System.Text
-
Expand
System.Threading
-
Expand
System.Runtime.Remoting.Channels.Http
-
Expand
System.Runtime.Remoting.Channels.Tcp
-
Expand
System.Runtime.Remoting.MetadataServices
-
Expand
System.Runtime.Serialization.Formatters.Soap.Xml
-
Expand
System.Runtime.Serialization.Formatters.Soap
-
Expand
Microsoft.Tools.Caspol
-
Expand
Microsoft.Tools.Build
-
Expand
Microsoft.CSharp
-
Expand
System.CodeDom
-
Expand
System.CodeDom.Compiler
-
Expand
System.Collections.Specialized
-
Expand
System.ComponentModel
-
Expand
System.ComponentModel.Design
-
Expand
System.ComponentModel.Design.Serialization
-
Expand
System.Configuration
-
Expand
System.Web
-
Expand
System.Configuration.Provider
-
Expand
System.Configuration.Internal
-
Expand
System.Internal
-
Expand
System.Windows.Forms
-
Expand
System.Net
-
Expand
AbortState
-
Expand
AddressInfo
-
Expand
AddressInfoHints
-
Expand
AsyncConnectionPoolRequest
-
Expand
AsyncTriState
-
Expand
AuthenticationManager
-
Authenticate(string, WebRequest, ICredentials)
-
AuthenticationManager()
-
BindModule(Uri, Authorization, IAuthenticationModule)
-
CredentialPolicy()
-
CustomTargetNameDictionary()
-
EnsureConfigLoaded()
-
findModule(string)
-
FindSubstringNotInQuotes(string, string)
-
generalize(Uri)
-
IndexOf(string, string, int, int)
-
ModuleList()
-
PreAuthenticate(WebRequest, ICredentials)
-
Register(IAuthenticationModule)
-
RegisteredModules()
-
RemoveAuthenticationType(ArrayList, string)
-
SplitNoQuotes(string, int)
-
SpnDictionary()
-
Unregister(IAuthenticationModule)
-
Unregister(string)
-
Expand
AuthenticationState
-
Expand
Authorization
-
Expand
AutoWebProxyScriptEngine
-
Expand
AutoWebProxyScriptWrapper
-
Expand
AutoWebProxyScriptWrapper
-
Expand
AutoWebProxyState
-
Expand
BaseLoggingObject
-
Expand
BasicClient
-
Expand
Blob
-
Expand
Booleans
-
Expand
BufferChunkBytes
-
Expand
BufferOffsetSize
-
Expand
CallbackClosure
-
Expand
CaseInsensitiveAscii
-
Expand
ChunkParse
-
Expand
CloseExState
-
Expand
CommandStream
-
Expand
Comparer
-
Expand
Connection
-
Expand
ConnectionGroup
-
Expand
ConnectionModes
-
Expand
ConnectionMonitorEntry
-
Expand
ConnectionPool
-
Expand
ConnectionPoolManager
-
Expand
ConnectionReturnResult
-
Expand
ConnectSocketState
-
Expand
ConnectStream
-
Expand
ContextAwareResult
-
Expand
ControlData
-
Expand
ControlDataIPv6
-
Expand
Cookie
-
Expand
CookieCollection
-
Expand
CookieCollectionEnumerator
-
Expand
CookieContainer
-
Expand
CookieException
-
Expand
CookieModule
-
Expand
CookieParser
-
Expand
CookieToken
-
Expand
CookieTokenizer
-
Expand
CookieVariant
-
Expand
CoreResponseData
-
Expand
CredentialCache
-
Expand
CredentialEnumerator
-
Expand
CredentialHostKey
-
Expand
CredentialKey
-
Expand
DataParseStatus
-
Expand
DebugCriticalHandleMinusOneIsInvalid
-
Expand
DebugCriticalHandleZeroOrMinusOneIsInvalid
-
Expand
DebugSafeHandle
-
Expand
DebugSafeHandleMinusOneIsInvalid
-
Expand
DecompressionMethods
-
Expand
DefaultPorts
-
Expand
DeflateWrapperStream
-
Expand
DelayedRegex
-
Expand
DirectProxy
-
Expand
Dns
-
Expand
DnsPermission
-
Expand
DnsPermissionAttribute
-
Expand
DownloadBitsState
-
Expand
DownloadDataCompletedEventArgs
-
Expand
DownloadProgressChangedEventArgs
-
Expand
DownloadStringCompletedEventArgs
-
Expand
EmptyStream
-
Expand
EmptyWebProxy
-
Expand
EndPoint
-
Expand
EndpointPermission
-
Expand
EndPointType
-
Expand
ErrorCodes
-
Expand
ExceptionHelper
-
Expand
File
-
Expand
FileWebRequest
-
Expand
FileWebRequestCreator
-
Expand
FileWebResponse
-
Expand
FileWebStream
-
Expand
Ftp
-
Expand
FtpControlStream
-
Expand
FtpDataStream
-
Expand
FtpLoginState
-
Expand
FtpMethodFlags
-
Expand
FtpMethodInfo
-
Expand
FtpOperation
-
Expand
FtpPrimitive
-
Expand
FtpStatusCode
-
Expand
FtpWebRequest
-
Expand
FtpWebRequestCreator
-
Expand
FtpWebResponse
-
Expand
GetPathOption
-
Expand
GlobalLog
-
Expand
GlobalProxySelection
-
Expand
GZipWrapperStream
-
Expand
HeaderEncoding
-
Expand
HeaderInfo
-
Expand
HeaderInfoTable
-
Expand
HeaderVariantInfo
-
Expand
hostent
-
Expand
Http
-
Expand
HttpBehaviour
-
Expand
HttpDateParse
-
Expand
HttpKnownHeaderNames
-
Expand
HttpProcessingResult
-
Expand
HttpProtocolUtils
-
Expand
HttpRequestCreator
-
Expand
HttpRequestHeader
-
Expand
HttpResponseHeader
-
Expand
HttpStatusCode
-
Expand
HttpVersion
-
Expand
HttpWebRequest
-
Expand
HttpWebRequestComparer
-
Expand
HttpWebResponse
-
Expand
HttpWriteMode
-
Expand
IAuthenticationModule
-
Expand
IAutoWebProxy
-
Expand
ICloseEx
-
Expand
ICredentialPolicy
-
Expand
ICredentials
-
Expand
ICredentialsByHost
-
Expand
InfiniteTimer
-
Expand
InfiniteTimerQueue
-
Expand
InnerSafeCloseSocket
-
Expand
InterlockedGate
-
Expand
InterlockedStack
-
Expand
InternalException
-
Expand
IntPtrHelper
-
Expand
IPAddress
-
Expand
IPEndPoint
-
Expand
IPHostEntry
-
Expand
IPMulticastRequest
-
Expand
IPv6MulticastRequest
-
Expand
IReadChunkBytes
-
Expand
ISessionAuthenticationModule
-
Expand
IWebProxy
-
Expand
IWebProxyScript
-
Expand
IWebRequestCreate
-
Expand
KnownHttpVerb
-
Expand
LazyAsyncResult
-
Expand
Linger
-
Expand
Logging
-
Expand
MemoryChunk
-
Expand
MyMethodInfo
-
Expand
NameInfoFlags
-
Expand
NclConstants
-
Expand
NclTraceSource
-
Expand
NclUtilities
-
Expand
NestedMultipleAsyncResult
-
Expand
NestedSingleAsyncResult
-
Expand
Nesting
-
Expand
NetRes
-
Expand
NetworkAccess
-
Expand
NetworkCredential
-
Expand
OpenReadCompletedEventArgs
-
Expand
OpenWriteCompletedEventArgs
-
Expand
OSSOCK
-
Expand
PathList
-
Expand
PathListComparer
-
Expand
PipelineEntry
-
Expand
PipelineEntryFlags
-
Expand
PipelineInstruction
-
Expand
PooledStream
-
Expand
PrefixLookup
-
Expand
ProgressData
-
Expand
ProtocolViolationException
-
Expand
ProxyChain
-
Expand
ProxyEnumerator
-
Expand
ProxyRegBlob
-
Expand
ProxyScriptChain
-
Expand
Queue
-
Expand
ReadState
-
Expand
ReceiveState
-
Expand
RecognizedAttribute
-
Expand
RequestContext
-
Expand
RequestStage
-
Expand
ResolveAsyncResult
-
Expand
ResponseDescription
-
Expand
RfcChar
-
Expand
SafeCloseHandle
-
Expand
SafeCloseHandle
-
Expand
SafeCloseSocket
-
Expand
SafeCloseSocket
-
Expand
SafeCloseSocketAndEvent
-
Expand
SafeGlobalFree
-
Expand
SafeGlobalFree
-
Expand
SafeLocalFree
-
Expand
SafeLocalFree
-
Expand
SafeNetHandles
-
Expand
SafeNetHandlesSafeOverlappedFree
-
Expand
SafeOverlappedFree
-
Expand
SafeOverlappedFree
-
Expand
ScatterGatherBuffers
-
Expand
ScriptHost
-
Expand
Semaphore
-
Expand
ServicePoint
-
Expand
ServicePointManager
-
Expand
ShellExpression
-
Expand
ShExpTokens
-
Expand
SocketAddress
-
Expand
SocketConstructorFlags
-
Expand
SocketPermission
-
Expand
SocketPermissionAttribute
-
Expand
SplitWritesState
-
Expand
SpnDictionary
-
Expand
Stamp
-
Expand
State
-
Expand
StateFlags
-
Expand
StaticProxy
-
Expand
StatusLineValues
-
Expand
StreamChunkBytes
-
Expand
SyncMemoryStream
-
Expand
SyncStatus
-
Expand
SystemNetworkCredential
-
Expand
ThreadContext
-
Expand
ThreadKindFrame
-
Expand
ThreadKinds
-
Expand
TimeoutValidator
-
Expand
Timer
-
Expand
TimerNode
-
Expand
TimerQueue
-
Expand
TimerState
-
Expand
TimerThread
-
Expand
TimerThreadState
-
Expand
TransmitFileBuffers
-
Expand
TransportType
-
Expand
TriState
-
Expand
TunnelStateObject
-
Expand
UnsafeNclNativeMethods
-
Expand
UploadBitsState
-
Expand
UploadDataCompletedEventArgs
-
Expand
UploadFileCompletedEventArgs
-
Expand
UploadProgressChangedEventArgs
-
Expand
UploadStringCompletedEventArgs
-
Expand
UploadValuesCompletedEventArgs
-
Expand
ValidationHelper
-
Expand
WebClient
-
Expand
WebClientWriteStream
-
Expand
WebException
-
Expand
WebExceptionInternalStatus
-
Expand
WebExceptionMapping
-
Expand
WebExceptionStatus
-
Expand
WebHeaderCollection
-
Expand
WebHeaderCollectionType
-
Expand
WebParseError
-
Expand
WebParseErrorCode
-
Expand
WebParseErrorSection
-
Expand
WebPermission
-
Expand
WebPermissionAttribute
-
Expand
WebProxy
-
Expand
WebProxyData
-
Expand
WebProxyScriptHelper
-
Expand
WebProxyScriptHelper
-
Expand
WebProxyWrapper
-
Expand
WebProxyWrapperOpaque
-
Expand
WebRequest
-
Expand
WebRequestMethods
-
Expand
WebRequestPrefixElement
-
Expand
WebResponse
-
Expand
Win32
-
Expand
WriteBufferState
-
Expand
WriteHeadersCallbackState
-
Expand
WSABuffer
-
Expand
WSAData
-
Expand
WSAMsg
-
Expand
WSAPROTOCOL_INFO
-
Expand
WSAPROTOCOLCHAIN
-
Expand
System.Net.Sockets
-
Expand
System.Net.NetworkInformation
-
Expand
System.Net.ComImports
-
Expand
System.Net.Security
-
Expand
System.Net.Cache
-
Expand
System.Net.Configuration
-
Expand
System.Text.RegularExpressions
-
Expand
System.Tools
-
Expand
System.IO.Compression
-
Expand
System.IO.Ports
-
Expand
System.Security.AccessControl
-
Expand
System.Xml
-
Expand
System.Xml.XPath.DataBinding
-
Expand
System.Xml.Schema
-
Expand
System.Xml.Serialization
-
Expand
System.Xml.Serialization.Advanced
-
Expand
System.Xml.Serialization.Configuration
-
Expand
System.Xml.XPath
-
Expand
System.Xml.Xsl
-
Expand
System.Xml.Xsl.IlGen
-
Expand
System.Xml.Xsl.Qil
-
Expand
System.Xml.Xsl.Runtime
-
Expand
System.Xml.Xsl.XPath
-
Expand
System.Xml.Xsl.Xslt
-
Expand
System.Xml.Xsl.XsltOld
-
Expand
System.Xml.Xsl.XsltOld.Debugger
-
Expand
Microsoft.JScript
-
Expand
Microsoft.Vsa
-
Expand
Microsoft.JScript.Vsa
- namespace System.Net
- {
-
- using System.Collections;
- using System.Collections.Generic;
- using System.Collections.Specialized;
- using System.Configuration;
- using System.Globalization;
- using System.Net.Configuration;
- using System.Reflection;
- using System.Security.Permissions;
- using System;
- using System.Threading;
-
-
-
-
-
- public interface ICredentialPolicy
- {
- bool ShouldSendCredential(Uri challengeUri, WebRequest request, NetworkCredential credential, IAuthenticationModule authenticationModule);
- }
-
- /// <devdoc>
- /// <para>Manages the authentication modules called during the client authentication
- /// process.</para>
- /// </devdoc>
- public class AuthenticationManager
- {
-
-
- private static PrefixLookup s_ModuleBinding = new PrefixLookup();
-
- private static ArrayList s_ModuleList;
- private static ICredentialPolicy s_ICredentialPolicy;
- private static SpnDictionary m_SpnDictionary = new SpnDictionary();
-
-
-
- private AuthenticationManager()
- {
- }
-
-
-
-
- public static ICredentialPolicy CredentialPolicy {
- get { return s_ICredentialPolicy; }
- set {
- ExceptionHelper.ControlPolicyPermission.Demand();
- s_ICredentialPolicy = value;
- }
- }
-
-
- public static StringDictionary CustomTargetNameDictionary {
- get { return m_SpnDictionary; }
- }
-
-
-
- static internal SpnDictionary SpnDictionary {
- get { return m_SpnDictionary; }
- }
-
-
-
- static internal void EnsureConfigLoaded()
- {
- try {
- object o = ModuleList;
- }
- catch (Exception e) {
- if (e is ThreadAbortException || e is OutOfMemoryException || e is StackOverflowException)
- throw;
-
-
- }
- catch {
-
-
- }
- }
-
-
-
-
-
-
- private static ArrayList ModuleList {
-
- get {
-
-
-
-
-
-
-
- if (s_ModuleList == null) {
- lock (s_ModuleBinding) {
- if (s_ModuleList == null) {
- GlobalLog.Print("AuthenticationManager::Initialize(): calling ConfigurationManager.GetSection()");
-
-
-
- List<Type> authenticationModuleTypes = AuthenticationModulesSectionInternal.GetSection().AuthenticationModules;
-
-
-
-
-
-
-
-
-
-
-
- ArrayList moduleList = new ArrayList();
- IAuthenticationModule moduleToRegister;
- foreach (Type type in authenticationModuleTypes) {
- try {
-
-
- moduleToRegister = Activator.CreateInstance(type, BindingFlags.CreateInstance | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public, null, new object[0], CultureInfo.InvariantCulture) as IAuthenticationModule;
- if (moduleToRegister != null) {
- GlobalLog.Print("WebRequest::Initialize(): Register:" + moduleToRegister.AuthenticationType);
- RemoveAuthenticationType(moduleList, moduleToRegister.AuthenticationType);
- moduleList.Add(moduleToRegister);
- }
- }
- catch (Exception exception) {
-
-
-
- GlobalLog.Print("AuthenticationManager::constructor failed to initialize: " + exception.ToString());
- }
- catch {
-
-
-
- GlobalLog.Print("AuthenticationManager::constructor failed to initialize: Non-CLS Compliant Exception");
- }
- }
-
- s_ModuleList = moduleList;
- }
- }
- }
-
- return s_ModuleList;
- }
- }
-
-
- private static void RemoveAuthenticationType(ArrayList list, string typeToRemove)
- {
- for (int i = 0; i < list.Count; ++i) {
- if (string.Compare(((IAuthenticationModule)list[i]).AuthenticationType, typeToRemove, StringComparison.OrdinalIgnoreCase) == 0) {
- list.RemoveAt(i);
- break;
- }
-
- }
- }
-
- /// <devdoc>
- /// <para>Call each registered authentication module to determine the first module that
- /// can respond to the authentication request.</para>
- /// </devdoc>
- public static Authorization Authenticate(string challenge, WebRequest request, ICredentials credentials)
- {
-
-
-
- if (request == null) {
- throw new ArgumentNullException("request");
- }
- if (credentials == null) {
- throw new ArgumentNullException("credentials");
- }
- if (challenge == null) {
- throw new ArgumentNullException("challenge");
- }
-
- GlobalLog.Print("AuthenticationManager::Authenticate() challenge:[" + challenge + "]");
-
- Authorization response = null;
-
- HttpWebRequest httpWebRequest = request as HttpWebRequest;
- if (httpWebRequest != null && httpWebRequest.CurrentAuthenticationState.Module != null) {
- response = httpWebRequest.CurrentAuthenticationState.Module.Authenticate(challenge, request, credentials);
- }
- else {
-
- lock (s_ModuleBinding) {
-
-
-
- for (int i = 0; i < ModuleList.Count; i++) {
- IAuthenticationModule authenticationModule = (IAuthenticationModule)ModuleList[i];
-
-
-
-
-
-
- if (httpWebRequest != null) {
- httpWebRequest.CurrentAuthenticationState.Module = authenticationModule;
- }
- response = authenticationModule.Authenticate(challenge, request, credentials);
-
- if (response != null) {
-
-
-
- GlobalLog.Print("AuthenticationManager::Authenticate() found IAuthenticationModule:[" + authenticationModule.AuthenticationType + "]");
- break;
- }
- }
- }
- }
-
- return response;
- }
-
- /// <devdoc>
- /// <para>Pre-authenticates a request.</para>
- /// </devdoc>
- public static Authorization PreAuthenticate(WebRequest request, ICredentials credentials)
- {
- GlobalLog.Print("AuthenticationManager::PreAuthenticate() request:" + ValidationHelper.HashString(request) + " credentials:" + ValidationHelper.HashString(credentials));
- if (request == null) {
- throw new ArgumentNullException("request");
- }
- if (credentials == null) {
- return null;
- }
-
- HttpWebRequest httpWebRequest = request as HttpWebRequest;
- IAuthenticationModule authenticationModule;
- if (httpWebRequest == null)
- return null;
-
-
-
-
- string moduleName = s_ModuleBinding.Lookup(httpWebRequest.ChallengedUri.AbsoluteUri) as string;
- GlobalLog.Print("AuthenticationManager::PreAuthenticate() s_ModuleBinding.Lookup returns:" + ValidationHelper.ToString(moduleName));
- if (moduleName == null)
- return null;
- authenticationModule = findModule(moduleName);
- if (authenticationModule == null) {
-
-
- return null;
- }
-
-
-
- Authorization authorization = authenticationModule.PreAuthenticate(request, credentials);
-
- if (authorization != null && !authorization.Complete && httpWebRequest != null)
- httpWebRequest.CurrentAuthenticationState.Module = authenticationModule;
-
- GlobalLog.Print("AuthenticationManager::PreAuthenticate() IAuthenticationModule.PreAuthenticate() returned authorization:" + ValidationHelper.HashString(authorization));
- return authorization;
- }
-
-
- /// <devdoc>
- /// <para>Registers an authentication module with the authentication manager.</para>
- /// </devdoc>
- public static void Register(IAuthenticationModule authenticationModule)
- {
- ExceptionHelper.UnmanagedPermission.Demand();
- if (authenticationModule == null) {
- throw new ArgumentNullException("authenticationModule");
- }
- GlobalLog.Print("AuthenticationManager::Register() registering :[" + authenticationModule.AuthenticationType + "]");
- lock (s_ModuleBinding) {
- IAuthenticationModule existentModule = findModule(authenticationModule.AuthenticationType);
- if (existentModule != null) {
- ModuleList.Remove(existentModule);
- }
- ModuleList.Add(authenticationModule);
- }
- }
-
- /// <devdoc>
- /// <para>Unregisters authentication modules for an authentication scheme.</para>
- /// </devdoc>
- public static void Unregister(IAuthenticationModule authenticationModule)
- {
- ExceptionHelper.UnmanagedPermission.Demand();
- if (authenticationModule == null) {
- throw new ArgumentNullException("authenticationModule");
- }
- GlobalLog.Print("AuthenticationManager::Unregister() unregistering :[" + authenticationModule.AuthenticationType + "]");
- lock (s_ModuleBinding) {
- if (!ModuleList.Contains(authenticationModule)) {
- throw new InvalidOperationException(SR.GetString(SR.net_authmodulenotregistered));
- }
- ModuleList.Remove(authenticationModule);
- }
- }
- /// <devdoc>
- /// <para>Unregisters authentication modules for an authentication scheme.</para>
- /// </devdoc>
- public static void Unregister(string authenticationScheme)
- {
- ExceptionHelper.UnmanagedPermission.Demand();
- if (authenticationScheme == null) {
- throw new ArgumentNullException("authenticationScheme");
- }
- GlobalLog.Print("AuthenticationManager::Unregister() unregistering :[" + authenticationScheme + "]");
- lock (s_ModuleBinding) {
- IAuthenticationModule existentModule = findModule(authenticationScheme);
- if (existentModule == null) {
- throw new InvalidOperationException(SR.GetString(SR.net_authschemenotregistered));
- }
- ModuleList.Remove(existentModule);
- }
- }
-
- /// <devdoc>
- /// <para>
- /// Returns a list of registered authentication modules.
- /// </para>
- /// </devdoc>
- public static IEnumerator RegisteredModules {
- get { return ModuleList.GetEnumerator(); }
- }
-
- /// <devdoc>
- /// <para>
- /// Binds an authentication response to a request for pre-authentication.
- /// </para>
- /// </devdoc>
-
-
-
-
- static internal void BindModule(Uri uri, Authorization response, IAuthenticationModule module)
- {
- GlobalLog.Assert(module.CanPreAuthenticate, "AuthenticationManager::BindModule()|module.CanPreAuthenticate == false");
- if (response.ProtectionRealm != null) {
-
-
- string[] prefix = response.ProtectionRealm;
-
- for (int k = 0; k < prefix.Length; k++) {
-
-
-
- s_ModuleBinding.Add(prefix[k], module.AuthenticationType);
- }
- }
- else {
-
-
- string prefix = generalize(uri);
-
-
-
- s_ModuleBinding.Add(prefix, module.AuthenticationType);
- }
- }
-
-
-
-
- private static IAuthenticationModule findModule(string authenticationType)
- {
- IAuthenticationModule returnAuthenticationModule = null;
- ArrayList moduleList = ModuleList;
- IAuthenticationModule authenticationModule;
- for (int k = 0; k < moduleList.Count; k++) {
- authenticationModule = (IAuthenticationModule)moduleList[k];
- if (string.Compare(authenticationModule.AuthenticationType, authenticationType, StringComparison.OrdinalIgnoreCase) == 0) {
- returnAuthenticationModule = authenticationModule;
- break;
- }
- }
- return returnAuthenticationModule;
- }
-
-
-
-
-
-
- private static string generalize(Uri location)
- {
- string completeUri = location.AbsoluteUri;
- int lastFwdSlash = completeUri.LastIndexOf('/');
- if (lastFwdSlash < 0) {
- return completeUri;
- }
- return completeUri.Substring(0, lastFwdSlash + 1);
- }
-
-
-
-
-
-
- static internal int FindSubstringNotInQuotes(string challenge, string signature)
- {
- int index = -1;
- if (challenge != null && signature != null && challenge.Length >= signature.Length) {
- int firstQuote = -1;
- int secondQuote = -1;
- for (int i = 0; i < challenge.Length; i++) {
- if (challenge[i] == '"') {
- if (firstQuote <= secondQuote)
- firstQuote = i;
- else
- secondQuote = i;
- }
-
- if (i == challenge.Length - 1 || (challenge[i] == '"' && firstQuote > secondQuote)) {
-
-
- if (i == challenge.Length - 1)
- firstQuote = challenge.Length;
-
-