<?xml version="1.0" encoding="utf-8"?>
<Type Name="AuthenticationManager" FullName="System.Net.AuthenticationManager" FullNameSP="System_Net_AuthenticationManager" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public AuthenticationManager extends System.Object" />
  <TypeSignature Language="C#" Value="public class AuthenticationManager" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AuthenticationManager extends System.Object" />
  <MemberOfLibrary>Networking</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.x.x</AssemblyVersion>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>
        <see cref="T:System.Net.AuthenticationManager" /> is a static class that manages the authentication modules that an application uses. When a request is made to protected resources, the <see cref="T:System.Net.AuthenticationManager" /> calls the <see cref="M:System.Net.AuthenticationManager.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method to get an <see cref="T:System.Net.Authorization" /> instance to use in subsequent requests.</para>
      <para>The <see cref="T:System.Net.AuthenticationManager" /> queries each registered authentication module by calling the <see cref="M:System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method for each module. The first authentication module to return an <see cref="T:System.Net.Authorization" /> instance is used to authenticate the request.</para>
      <para>Modules that provide the basic, digest, negotiate, NTLM, and Kerberos authentication types are registered with the <see cref="T:System.Net.AuthenticationManager" /> by default. Additional authentication modules that implement the <see cref="T:System.Net.IAuthenticationModule" /> interface can be added using the <see cref="M:System.Net.AuthenticationManager.Register(System.Net.IAuthenticationModule)" /> method. Authentication modules are called in the order in which they were added to the list.</para>
      <block subset="none" type="note">
        <para>The Kerberos and negotiate authentication type is not supported on Windows 95/98 or Windows NT 4.0.</para>
      </block>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Manages the authentication modules called during the client authentication process.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName="Authenticate">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Net.Authorization Authenticate(string challenge, class System.Net.WebRequest request, class System.Net.ICredentials credentials)" />
      <MemberSignature Language="C#" Value="public static System.Net.Authorization Authenticate (string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Net.Authorization Authenticate(string challenge, class System.Net.WebRequest request, class System.Net.ICredentials credentials) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Net.Authorization</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="challenge" Type="System.String" />
        <Parameter Name="request" Type="System.Net.WebRequest" />
        <Parameter Name="credentials" Type="System.Net.ICredentials" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="challenge " />, <paramref name="request " />, or <paramref name="credentials " /> is <see langword="null" />.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.Net.AuthenticationManager.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method calls the <see cref="M:System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method on each registered authentication module until one of the module responds with an <see cref="T:System.Net.Authorization" /> instance.</para>
          <para>The first <see cref="T:System.Net.Authorization" /> instance returned is used to authenticate the request. If no authentication module can authenticate the request, the <see cref="M:System.Net.AuthenticationManager.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method returns null.</para>
          <para>Authentication modules are called in the order in which they are registered with the <see cref="T:System.Net.AuthenticationManager" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Calls each registered authentication module to find the first module that can respond to the authentication request.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>An instance of the <see cref="T:System.Net.Authorization" /> class containing the result of the authorization attempt. If there is no authentication module to respond to the challenge, this method returns null.</para>
        </returns>
        <param name="challenge">
          <attribution license="cc4" from="Microsoft" modified="false" />The challenge returned by the Internet resource. </param>
        <param name="request">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.WebRequest" /> that initiated the authentication challenge. </param>
        <param name="credentials">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.ICredentials" /> associated with this request. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="CredentialPolicy">
      <MemberSignature Language="C#" Value="public static System.Net.ICredentialPolicy CredentialPolicy { get; set; }" />
      <MemberSignature Language="ILAsm" Value=".property class System.Net.ICredentialPolicy CredentialPolicy" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Net.ICredentialPolicy</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The credential policy determines whether to send credentials when sending a request for a network resource, such as the content of a Web page. If credentials are sent, servers that require client authentication can attempt to authenticate the client when the request is received instead of sending a response indicating that the client's credentials are required. While this saves a round trip to the server, this must be balanced against the security risk inherent in sending credentials across the network. When the destination server does not require client authentication it is best to not send credentials.</para>
          <para>The credential policy will be called only for requests that specify credentials or use a <see cref="T:System.Net.WebProxy" /> object that specifies credentials. </para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets or sets the credential policy to be used for resource requests made using the <see cref="T:System.Net.HttpWebRequest" /> class.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="CustomTargetNameDictionary">
      <MemberSignature Language="C#" Value="public static System.Collections.Specialized.StringDictionary CustomTargetNameDictionary { get; }" />
      <MemberSignature Language="ILAsm" Value=".property class System.Collections.Specialized.StringDictionary CustomTargetNameDictionary" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>System.MonoTODO</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Collections.Specialized.StringDictionary</ReturnType>
      </ReturnValue>
      <Docs>
        <value>To be added.</value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>An SPN is a name by which a client uniquely identifies an instance of a service or application on a server for purposes of mutual authentication. Mutual authentication is requested by default, and you can require it by setting <see cref="P:System.Net.WebRequest.AuthenticationLevel" /> to <see cref="F:System.Net.Security.AuthenticationLevel.MutualAuthRequired" /> in your request.</para>
          <para>When a <see cref="T:System.Net.WebRequest" /> requires mutual authentication, the SPN for the destination must be supplied by the client. If you know the SPN, you can add it to the <see cref="P:System.Net.AuthenticationManager.CustomTargetNameDictionary" /> before sending the request. If you have not added SPN information to this dictionary, the <see cref="T:System.Net.AuthenticationManager" /> uses the <see cref="P:System.Net.WebRequest.RequestUri" /> method to compose the most likely SPN; however, this is a computed value and might be incorrect. If mutual authentication is attempted and fails, you can check the dictionary to determine the computed SPN. No SPN is entered into the dictionary if the authentication protocol does not support mutual authentication.</para>
          <para>To add an SPN value to this dictionary, use the <see cref="P:System.Uri.AbsoluteUri" /> of the <see cref="P:System.Net.WebRequest.RequestUri" /> as the key. Internally, the key is truncated to include the <see cref="P:System.Uri.Scheme" />, <see cref="P:System.Uri.Host" />, and the <see cref="P:System.Uri.Port" /> if it is not the default port. </para>
          <block subset="none" type="note">
            <para>Accessing the methods and properties of the <see cref="P:System.Net.AuthenticationManager.CustomTargetNameDictionary" /> requires unrestricted <see cref="T:System.Net.WebPermission" />.</para>
          </block>
          <block subset="none" type="note">
            <para>When Kerberos authentication is performed through a proxy, both the proxy and the ultimate host name need to be resolved to an SPN. The proxy name resolution is protected by a timeout. Resolution of the ultimate host name to a SPN requires a DNS lookup, and there is no timeout associated directly with this operation. Therefore synchronous operations may take longer to timeout. To overcome this, add the ultimate host's URI prefix to the SPN cache prior to making requests to it.</para>
          </block>
          <para>Version 3.5 SP1 now defaults to specifying the host name used in the request URL in the SPN in the NTLM (NT LAN Manager) authentication exchange when the <see cref="P:System.Net.AuthenticationManager.CustomTargetNameDictionary" /> property is not set. The host name used in the request URL may be different from the Host header specified in the <see cref="T:System.Net.HttpRequestHeader" /> in the client request. The host name used in the request URL may be different from the actual host name of the server, the machine name of the server, the computer's IP address, or the loopback address. In these cases, Windows will fail the authentication request. To address the issue, you may need to notify Windows that the host name used in the request URL in the client request ("contoso", for example) is actually an alternate name for the local computer.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets the dictionary that contains Service Principal Names (SPNs) that are used to identify hosts during Kerberos authentication for requests made using <see cref="T:System.Net.WebRequest" /> and its derived classes.</para>
        </summary>
      </Docs>
    </Member>
    <Member MemberName="PreAuthenticate">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static class System.Net.Authorization PreAuthenticate(class System.Net.WebRequest request, class System.Net.ICredentials credentials)" />
      <MemberSignature Language="C#" Value="public static System.Net.Authorization PreAuthenticate (System.Net.WebRequest request, System.Net.ICredentials credentials);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Net.Authorization PreAuthenticate(class System.Net.WebRequest request, class System.Net.ICredentials credentials) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Net.Authorization</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="request" Type="System.Net.WebRequest" />
        <Parameter Name="credentials" Type="System.Net.ICredentials" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <para>
            <paramref name="request " />is <see langword="null." /></para>
        </exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>If the authentication module can preauthenticate the request, the <see cref="M:System.Net.AuthenticationManager.PreAuthenticate(System.Net.WebRequest,System.Net.ICredentials)" /> method returns an Authentication instance and sends the authorization information to the server preemptively instead of waiting for the resource to issue a challenge. This behavior is outlined in section 3.3 of RFC 2617 (HTTP Authentication: Basic and Digest Access Authentication). Authentication modules that support preauthentication allow clients to improve server efficiency by avoiding extra round trips caused by authentication challenges.</para>
          <para>Authorization modules that can preauthenticate requests set the <see cref="P:System.Net.IAuthenticationModule.CanPreAuthenticate" /> property to true.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Preauthenticates a request.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>An instance of the <see cref="T:System.Net.Authorization" /> class if the request can be preauthenticated; otherwise, null. If <paramref name="credentials" /> is null, this method returns null.</para>
        </returns>
        <param name="request">
          <attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Net.WebRequest" /> to an Internet resource. </param>
        <param name="credentials">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.ICredentials" /> associated with the request. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Register">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static void Register(class System.Net.IAuthenticationModule authenticationModule)" />
      <MemberSignature Language="C#" Value="public static void Register (System.Net.IAuthenticationModule authenticationModule);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Register(class System.Net.IAuthenticationModule authenticationModule) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="authenticationModule" Type="System.Net.IAuthenticationModule" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="authenticationModule " /> is <see langword="null" />.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.Net.AuthenticationManager.Register(System.Net.IAuthenticationModule)" /> method adds authentication modules to the end of the list of modules called by the <see cref="M:System.Net.AuthenticationManager.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method. Authentication modules are called in the order in which they were added to the list. If a module with the same <see cref="P:System.Net.IAuthenticationModule.AuthenticationType" /> is already registered, this method removes the registered module and adds <paramref name="authenticationModule" /> to the end of the list.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Registers an authentication module with the authentication manager.</para>
        </summary>
        <param name="authenticationModule">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IAuthenticationModule" /> to register with the authentication manager. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="RegisteredModules">
      <MemberSignature Language="ILASM" Value=".property class System.Collections.IEnumerator RegisteredModules { public hidebysig static specialname class System.Collections.IEnumerator get_RegisteredModules() }" />
      <MemberSignature Language="C#" Value="public static System.Collections.IEnumerator RegisteredModules { get; }" />
      <MemberSignature Language="ILAsm" Value=".property class System.Collections.IEnumerator RegisteredModules" />
      <MemberType>Property</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Collections.IEnumerator</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <value>
          <para>A <see cref="T:System.Collections.IEnumerator" /> that
   provides access to the list of registered
   authentication modules.</para>
        </value>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="P:System.Net.AuthenticationManager.RegisteredModules" /> property provides an <see cref="T:System.Collections.IEnumerator" /> instance that enables the list of registered authentication modules to be read. The <see cref="M:System.Net.AuthenticationManager.Register(System.Net.IAuthenticationModule)" /> method adds modules to the list, and the <see cref="M:System.Net.AuthenticationManager.Unregister(System.Net.IAuthenticationModule)" /> method removes modules from it.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Gets a list of authentication modules that are registered with the authentication manager.</para>
        </summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Unregister">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static void Unregister(class System.Net.IAuthenticationModule authenticationModule)" />
      <MemberSignature Language="C#" Value="public static void Unregister (System.Net.IAuthenticationModule authenticationModule);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Unregister(class System.Net.IAuthenticationModule authenticationModule) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="authenticationModule" Type="System.Net.IAuthenticationModule" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="authenticationModule " /> is <see langword="null" />.</exception>
        <exception cref="T:System.InvalidOperationException">
          <paramref name="authenticationModule " />is not a registered authentication module.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.Net.AuthenticationManager.Unregister(System.Net.IAuthenticationModule)" /> method removes the specified authentication module from the list of authentication modules called by the <see cref="M:System.Net.AuthenticationManager.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method. The module must have been added to the list using the <see cref="M:System.Net.AuthenticationManager.Register(System.Net.IAuthenticationModule)" /> method before it can be removed from the list.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Removes the specified authentication module from the list of registered modules.</para>
        </summary>
        <param name="authenticationModule">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IAuthenticationModule" /> to remove from the list of registered modules. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Unregister">
      <MemberSignature Language="ILASM" Value=".method public hidebysig static void Unregister(string authenticationScheme)" />
      <MemberSignature Language="C#" Value="public static void Unregister (string authenticationScheme);" />
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig void Unregister(string authenticationScheme) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>1.0.5000.0</AssemblyVersion>
        <AssemblyVersion>2.0.0.0</AssemblyVersion>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="authenticationScheme" Type="System.String" />
      </Parameters>
      <Docs>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="authenticationScheme " /> is <see langword="null" />.</exception>
        <exception cref="T:System.InvalidOperationException">There is no registered module with the <paramref name="authenticationScheme " /> authentication type.</exception>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.Net.AuthenticationManager.Unregister(System.Net.IAuthenticationModule)" /> method removes the authentication module with the specified authentication scheme from the list of authentication modules called by the <see cref="M:System.Net.AuthenticationManager.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method. The module must have been added to the list using the <see cref="M:System.Net.AuthenticationManager.Register(System.Net.IAuthenticationModule)" /> method before it can be removed from the list.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Removes authentication modules with the specified authentication scheme from the list of registered modules.</para>
        </summary>
        <param name="authenticationScheme">
          <attribution license="cc4" from="Microsoft" modified="false" />The authentication scheme of the module to remove. </param>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>