Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

100 lines
7.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Type Name="IntranetZoneCredentialPolicy" FullName="Microsoft.Win32.IntranetZoneCredentialPolicy">
<TypeSignature Language="C#" Value="public class IntranetZoneCredentialPolicy : System.Net.ICredentialPolicy" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit IntranetZoneCredentialPolicy extends System.Object implements class System.Net.ICredentialPolicy" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Net.ICredentialPolicy</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This policy allows credentials to be sent only if the requested resource is in the same domain as the client that is making the request. For many applications this is the optimal policy because it prevents network credentials from being sent with requests for resources that are not on the intranet.</para>
<block subset="none" type="note">
<para>
<see cref="T:System.Net.ICredentialPolicy" /> policies are invoked only if the <see cref="T:System.Net.WebRequest" /> or the <see cref="T:System.Net.WebProxy" /> that is associated with the request has credentials that are not null. Setting this policy has no effect on requests that do not specify credentials.</para>
</block>
<para>Use the <see cref="P:System.Net.AuthenticationManager.CredentialPolicy" /> property to set the <see cref="T:Microsoft.Win32.IntranetZoneCredentialPolicy" /> policy. The <see cref="T:System.Net.IAuthenticationModule" /> that handles authentication for the request will invoke the <see cref="M:Microsoft.Win32.IntranetZoneCredentialPolicy.ShouldSendCredential(System.Uri,System.Net.WebRequest,System.Net.NetworkCredential,System.Net.IAuthenticationModule)" /> method before performing the authentication. If the requested resource is in a different domain than the client, the <see cref="M:Microsoft.Win32.IntranetZoneCredentialPolicy.ShouldSendCredential(System.Uri,System.Net.WebRequest,System.Net.NetworkCredential,System.Net.IAuthenticationModule)" /> method returns false, and authentication is not performed.</para>
<para>This policy affects all instances of <see cref="T:System.Net.WebRequest" /> with non-null credentials in the current application domain. The policy cannot be overridden on individual requests.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Defines a credential policy to be used for resource requests that are made using <see cref="T:System.Net.WebRequest" /> and its derived classes.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public IntranetZoneCredentialPolicy ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Applications use this constructor to create objects that can be used to set the <see cref="P:System.Net.AuthenticationManager.CredentialPolicy" /> property.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:Microsoft.Win32.IntranetZoneCredentialPolicy" /> class.</para>
</summary>
</Docs>
</Member>
<Member MemberName="ShouldSendCredential">
<MemberSignature Language="C#" Value="public virtual bool ShouldSendCredential (Uri challengeUri, System.Net.WebRequest request, System.Net.NetworkCredential credential, System.Net.IAuthenticationModule authModule);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool ShouldSendCredential(class System.Uri challengeUri, class System.Net.WebRequest request, class System.Net.NetworkCredential credential, class System.Net.IAuthenticationModule authModule) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="challengeUri" Type="System.Uri" />
<Parameter Name="request" Type="System.Net.WebRequest" />
<Parameter Name="credential" Type="System.Net.NetworkCredential" />
<Parameter Name="authModule" Type="System.Net.IAuthenticationModule" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Applications do not call this method directly; it is called by the <see cref="T:System.Net.IAuthenticationModule" /> that is responsible for performing authentication with the server. If this method returns false, the <see cref="T:System.Net.IAuthenticationModule" /> will not authenticate the client to the server.</para>
<para>This method is 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>Returns a <see cref="T:System.Boolean" /> that indicates whether the client's credentials are sent with a request for a resource that was made using <see cref="T:System.Net.WebRequest" />.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>true if the requested resource is in the same domain as the client making the request; otherwise, false.</para>
</returns>
<param name="challengeUri">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Uri" /> that will receive the request.</param>
<param name="request">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.WebRequest" /> that represents the resource being requested.</param>
<param name="credential">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.NetworkCredential" /> that will be sent with the request if this method returns true.</param>
<param name="authModule">
<attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Net.IAuthenticationModule" /> that will conduct the authentication, if authentication is required.</param>
</Docs>
</Member>
</Members>
</Type>