-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathIAuthenticationModule.xml
More file actions
333 lines (301 loc) · 21.1 KB
/
IAuthenticationModule.xml
File metadata and controls
333 lines (301 loc) · 21.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<Type Name="IAuthenticationModule" FullName="System.Net.IAuthenticationModule">
<TypeSignature Language="C#" Value="public interface IAuthenticationModule" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IAuthenticationModule" FrameworkAlternate="net-10.0;net-11.0;net-8.0;net-9.0" />
<TypeSignature Language="DocId" Value="T:System.Net.IAuthenticationModule" />
<TypeSignature Language="VB.NET" Value="Public Interface IAuthenticationModule" />
<TypeSignature Language="F#" Value="type IAuthenticationModule = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IAuthenticationModule" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IAuthenticationModule" FrameworkAlternate="net-5.0;net-6.0;net-7.0;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1" />
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="10.0.0.0" FrameworkAlternate="net-10.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="11.0.0.0" FrameworkAlternate="net-11.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Net.Requests" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Interfaces />
<Docs>
<summary>Provides the base authentication interface for Web client authentication modules.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.IAuthenticationModule> interface defines the properties and methods that custom authentication modules must use.
Authentication modules conduct the entire authentication process with a server, responding to an authentication challenge as appropriate. This process may consist of requests to an authentication server separate from the resource server, as well as any other activities required to properly authenticate a request for a URI.
Custom authentication modules should implement the <xref:System.Net.IAuthenticationModule> interface and then register with the <xref:System.Net.AuthenticationManager.Register*?displayProperty=nameWithType> method. Authentication modules are also registered at program initialization by reading the configuration file.
## Examples
The following example creates a customized authentication class by implementing the <xref:System.Net.IAuthenticationModule> interface. For a complete example refer to the <xref:System.Net.AuthenticationManager> class.
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet6":::
:::code language="vb" source="~/snippets/visualbasic/System.Net/AuthenticationManager/Overview/custombasicauthentication.vb" id="Snippet6":::
]]></format>
</remarks>
<altmember cref="T:System.Net.AuthenticationManager" />
</Docs>
<Members>
<Member MemberName="Authenticate">
<MemberSignature Language="C#" Value="public System.Net.Authorization? Authenticate (string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);" FrameworkAlternate="net-10.0;net-11.0;net-5.0;net-6.0;net-7.0;net-8.0;net-9.0" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Net.Authorization Authenticate(string challenge, class System.Net.WebRequest request, class System.Net.ICredentials credentials) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" />
<MemberSignature Language="VB.NET" Value="Public Function Authenticate (challenge As String, request As WebRequest, credentials As ICredentials) As Authorization" />
<MemberSignature Language="F#" Value="abstract member Authenticate : string * System.Net.WebRequest * System.Net.ICredentials -> System.Net.Authorization" Usage="iAuthenticationModule.Authenticate (challenge, request, credentials)" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Net::Authorization ^ Authenticate(System::String ^ challenge, System::Net::WebRequest ^ request, System::Net::ICredentials ^ credentials);" />
<MemberSignature Language="C#" Value="public System.Net.Authorization Authenticate (string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials);" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.Authorization</ReturnType>
<Attributes>
<Attribute FrameworkAlternate="net-10.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</ReturnValue>
<Parameters>
<Parameter Name="challenge" Type="System.String" />
<Parameter Name="request" Type="System.Net.WebRequest" />
<Parameter Name="credentials" Type="System.Net.ICredentials" />
</Parameters>
<Docs>
<param name="challenge">The authentication challenge sent by the server.</param>
<param name="request">The <see cref="T:System.Net.WebRequest" /> instance associated with the challenge.</param>
<param name="credentials">The credentials associated with the challenge.</param>
<summary>Returns an instance of the <see cref="T:System.Net.Authorization" /> class in response to an authentication challenge from a server.</summary>
<returns>An <see cref="T:System.Net.Authorization" /> instance containing the authorization message for the request, or <see langword="null" /> if the challenge cannot be handled.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.IAuthenticationModule.Authenticate*> method conducts the authentication process with the server and returns an <xref:System.Net.Authorization> instance to the <xref:System.Net.AuthenticationManager>.
## Examples
The following example shows how to use the <xref:System.Net.IAuthenticationModule.Authenticate*> method. For a complete example refer to the <xref:System.Net.AuthenticationManager> class.
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/System.Net/AuthenticationManager/Overview/custombasicauthentication.vb" id="Snippet3":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>The <see cref="T:System.Net.AuthenticationManager" /> calls the <see cref="M:System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method on registered authentication modules to determine which module handles the challenge. If the authentication module cannot handle the challenge, the <see cref="M:System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> method must return <see langword="null" />. If the authentication module encounters an error while conducting the authentication process, <see cref="M:System.Net.IAuthenticationModule.Authenticate(System.String,System.Net.WebRequest,System.Net.ICredentials)" /> must throw an exception.</para>
</block>
</Docs>
</Member>
<Member MemberName="AuthenticationType">
<MemberSignature Language="C#" Value="public string AuthenticationType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string AuthenticationType" />
<MemberSignature Language="DocId" Value="P:System.Net.IAuthenticationModule.AuthenticationType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property AuthenticationType As String" />
<MemberSignature Language="F#" Value="member this.AuthenticationType : string" Usage="System.Net.IAuthenticationModule.AuthenticationType" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ AuthenticationType { System::String ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the authentication type provided by this authentication module.</summary>
<value>A string indicating the authentication type provided by this authentication module.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.IAuthenticationModule.AuthenticationType> property identifies the authentication type implemented by this authentication module. The <xref:System.Net.IAuthenticationModule.AuthenticationType> property is used by the <xref:System.Net.AuthenticationManager.Register*?displayProperty=nameWithType> method to determine if the authentication module has been registered, and by the <xref:System.Net.AuthenticationManager.Unregister*?displayProperty=nameWithType> method to remove a registered authentication module.
## Examples
The following example shows how to use the <xref:System.Net.IAuthenticationModule.AuthenticationType> property. For a complete example refer to the <xref:System.Net.AuthenticationManager> class.
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/System.Net/AuthenticationManager/Overview/custombasicauthentication.vb" id="Snippet7":::
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="CanPreAuthenticate">
<MemberSignature Language="C#" Value="public bool CanPreAuthenticate { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool CanPreAuthenticate" />
<MemberSignature Language="DocId" Value="P:System.Net.IAuthenticationModule.CanPreAuthenticate" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CanPreAuthenticate As Boolean" />
<MemberSignature Language="F#" Value="member this.CanPreAuthenticate : bool" Usage="System.Net.IAuthenticationModule.CanPreAuthenticate" />
<MemberSignature Language="C++ CLI" Value="public:
 property bool CanPreAuthenticate { bool get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether the authentication module supports preauthentication.</summary>
<value>
<see langword="true" /> if the authorization module supports preauthentication; otherwise <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.IAuthenticationModule.CanPreAuthenticate> property is set to `true` to indicate that the authentication module can respond with a valid <xref:System.Net.Authorization> instance when the <xref:System.Net.IAuthenticationModule.PreAuthenticate*> method is called.
## Examples
The following example shows how to use the <xref:System.Net.IAuthenticationModule.CanPreAuthenticate> property. For a complete example refer to the <xref:System.Net.AuthenticationManager> class.
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet7":::
:::code language="vb" source="~/snippets/visualbasic/System.Net/AuthenticationManager/Overview/custombasicauthentication.vb" id="Snippet7":::
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>This is typically a fixed value; either the authentication module can preauthenticate, or it cannot.</para>
</block>
</Docs>
</Member>
<Member MemberName="PreAuthenticate">
<MemberSignature Language="C#" Value="public System.Net.Authorization? PreAuthenticate (System.Net.WebRequest request, System.Net.ICredentials credentials);" FrameworkAlternate="net-10.0;net-11.0;net-5.0;net-6.0;net-7.0;net-8.0;net-9.0" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Net.Authorization PreAuthenticate(class System.Net.WebRequest request, class System.Net.ICredentials credentials) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.IAuthenticationModule.PreAuthenticate(System.Net.WebRequest,System.Net.ICredentials)" />
<MemberSignature Language="VB.NET" Value="Public Function PreAuthenticate (request As WebRequest, credentials As ICredentials) As Authorization" />
<MemberSignature Language="F#" Value="abstract member PreAuthenticate : System.Net.WebRequest * System.Net.ICredentials -> System.Net.Authorization" Usage="iAuthenticationModule.PreAuthenticate (request, credentials)" />
<MemberSignature Language="C++ CLI" Value="public:
 System::Net::Authorization ^ PreAuthenticate(System::Net::WebRequest ^ request, System::Net::ICredentials ^ credentials);" />
<MemberSignature Language="C#" Value="public System.Net.Authorization PreAuthenticate (System.Net.WebRequest request, System.Net.ICredentials credentials);" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<AssemblyVersion>11.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.Authorization</ReturnType>
<Attributes>
<Attribute FrameworkAlternate="net-10.0">
<AttributeName Language="C#">[System.Runtime.CompilerServices.Nullable(2)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.CompilerServices.Nullable(2)>]</AttributeName>
</Attribute>
</Attributes>
</ReturnValue>
<Parameters>
<Parameter Name="request" Type="System.Net.WebRequest" />
<Parameter Name="credentials" Type="System.Net.ICredentials" />
</Parameters>
<Docs>
<param name="request">The <see cref="T:System.Net.WebRequest" /> instance associated with the authentication request.</param>
<param name="credentials">The credentials associated with the authentication request.</param>
<summary>Returns an instance of the <see cref="T:System.Net.Authorization" /> class for an authentication request to a server.</summary>
<returns>An <see cref="T:System.Net.Authorization" /> instance containing the authorization message for the request.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When the <xref:System.Net.IAuthenticationModule.CanPreAuthenticate> property is `true`, the <xref:System.Net.IAuthenticationModule.PreAuthenticate*> method will return an instance of the <xref:System.Net.Authorization> class containing an authentication message.
## Examples
The following example shows how to use the <xref:System.Net.IAuthenticationModule.PreAuthenticate*> method. For a complete example refer to the <xref:System.Net.AuthenticationManager> class.
:::code language="csharp" source="~/snippets/csharp/System.Net/AuthenticationManager/Overview/custombasicauthentication.cs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/System.Net/AuthenticationManager/Overview/custombasicauthentication.vb" id="Snippet4":::
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>