-
Notifications
You must be signed in to change notification settings - Fork 26
/
IDownstreamWebApi.xml
380 lines (378 loc) Β· 31.2 KB
/
IDownstreamWebApi.xml
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<Type Name="IDownstreamWebApi" FullName="Microsoft.Identity.Web.IDownstreamWebApi">
<TypeSignature Language="C#" Value="public interface IDownstreamWebApi" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract beforefieldinit IDownstreamWebApi" />
<TypeSignature Language="DocId" Value="T:Microsoft.Identity.Web.IDownstreamWebApi" />
<TypeSignature Language="VB.NET" Value="Public Interface IDownstreamWebApi" />
<TypeSignature Language="F#" Value="type IDownstreamWebApi = interface" />
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.11.0.0</AssemblyVersion>
<AssemblyVersion>2.11.1.0</AssemblyVersion>
<AssemblyVersion>2.12.4.0</AssemblyVersion>
<AssemblyVersion>2.13.0.0</AssemblyVersion>
<AssemblyVersion>2.13.1.0</AssemblyVersion>
<AssemblyVersion>2.13.2.0</AssemblyVersion>
<AssemblyVersion>2.13.3.0</AssemblyVersion>
<AssemblyVersion>2.13.4.0</AssemblyVersion>
<AssemblyVersion>2.14.0.0</AssemblyVersion>
<AssemblyVersion>2.15.1.0</AssemblyVersion>
<AssemblyVersion>2.15.2.0</AssemblyVersion>
<AssemblyVersion>2.15.3.0</AssemblyVersion>
<AssemblyVersion>2.15.5.0</AssemblyVersion>
<AssemblyVersion>2.16.0.0</AssemblyVersion>
<AssemblyVersion>2.16.1.0</AssemblyVersion>
<AssemblyVersion>2.17.0.0</AssemblyVersion>
<AssemblyVersion>2.17.1.0</AssemblyVersion>
<AssemblyVersion>2.17.2.0</AssemblyVersion>
<AssemblyVersion>2.17.3.0</AssemblyVersion>
<AssemblyVersion>2.17.4.0</AssemblyVersion>
<AssemblyVersion>2.17.5.0</AssemblyVersion>
<AssemblyVersion>2.18.1.0</AssemblyVersion>
<AssemblyVersion>2.18.2.0</AssemblyVersion>
<AssemblyVersion>2.19.0.0</AssemblyVersion>
<AssemblyVersion>2.19.1.0</AssemblyVersion>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.Obsolete("Use IDownstreamApi in Microsoft.Identity.Abstractions, implemented in Microsoft.Identity.Web.DownstreamApi.See aka.ms/id-web-downstream-api-v2 for migration details.", false)]</AttributeName>
<AttributeName Language="F#">[<System.Obsolete("Use IDownstreamApi in Microsoft.Identity.Abstractions, implemented in Microsoft.Identity.Web.DownstreamApi.See aka.ms/id-web-downstream-api-v2 for migration details.", false)>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>
Interface used to call a downstream web API, for instance from controllers.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="CallWebApiForAppAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> CallWebApiForAppAsync (string serviceName, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? downstreamWebApiOptionsOverride = default, System.Net.Http.StringContent? content = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class System.Net.Http.HttpResponseMessage> CallWebApiForAppAsync(string serviceName, class System.Action`1<class Microsoft.Identity.Web.DownstreamWebApiOptions> downstreamWebApiOptionsOverride, class System.Net.Http.StringContent content) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.IDownstreamWebApi.CallWebApiForAppAsync(System.String,System.Action{Microsoft.Identity.Web.DownstreamWebApiOptions},System.Net.Http.StringContent)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CallWebApiForAppAsync (serviceName As String, Optional downstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional content As StringContent = Nothing) As Task(Of HttpResponseMessage)" />
<MemberSignature Language="F#" Value="abstract member CallWebApiForAppAsync : string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
override this.CallWebApiForAppAsync : string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>" Usage="iDownstreamWebApi.CallWebApiForAppAsync (serviceName, downstreamWebApiOptionsOverride, content)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serviceName" Type="System.String" />
<Parameter Name="downstreamWebApiOptionsOverride" Type="System.Action<Microsoft.Identity.Web.DownstreamWebApiOptions>" />
<Parameter Name="content" Type="System.Net.Http.StringContent" />
</Parameters>
<Docs>
<param name="serviceName">Name of the service describing the downstream web API. There can
be several configuration named sections mapped to a <see cref="T:Microsoft.Identity.Web.DownstreamWebApiOptions" />,
each for one downstream web API. You can pass-in null, but in that case <paramref name="downstreamWebApiOptionsOverride" />
needs to be set.</param>
<param name="downstreamWebApiOptionsOverride">Overrides the options proposed in the configuration described
by <paramref name="serviceName" />.</param>
<param name="content">HTTP content in the case where <see cref="P:Microsoft.Identity.Web.DownstreamWebApiOptions.HttpMethod" /> is
<see cref="P:System.Net.Http.HttpMethod.Patch" />, <see cref="P:System.Net.Http.HttpMethod.Post" />, <see cref="P:System.Net.Http.HttpMethod.Put" />.</param>
<summary>
Calls the downstream web API for the app, with the required scopes.
</summary>
<returns>An <see cref="T:System.Net.Http.HttpResponseMessage" /> that the application will process.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CallWebApiForAppAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> CallWebApiForAppAsync (string serviceName, string? authenticationScheme, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? downstreamWebApiOptionsOverride = default, System.Net.Http.StringContent? content = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class System.Net.Http.HttpResponseMessage> CallWebApiForAppAsync(string serviceName, string authenticationScheme, class System.Action`1<class Microsoft.Identity.Web.DownstreamWebApiOptions> downstreamWebApiOptionsOverride, class System.Net.Http.StringContent content) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.IDownstreamWebApi.CallWebApiForAppAsync(System.String,System.String,System.Action{Microsoft.Identity.Web.DownstreamWebApiOptions},System.Net.Http.StringContent)" />
<MemberSignature Language="VB.NET" Value="Public Function CallWebApiForAppAsync (serviceName As String, authenticationScheme As String, Optional downstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional content As StringContent = Nothing) As Task(Of HttpResponseMessage)" />
<MemberSignature Language="F#" Value="abstract member CallWebApiForAppAsync : string * string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>" Usage="iDownstreamWebApi.CallWebApiForAppAsync (serviceName, authenticationScheme, downstreamWebApiOptionsOverride, content)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serviceName" Type="System.String" />
<Parameter Name="authenticationScheme" Type="System.String" />
<Parameter Name="downstreamWebApiOptionsOverride" Type="System.Action<Microsoft.Identity.Web.DownstreamWebApiOptions>" />
<Parameter Name="content" Type="System.Net.Http.StringContent" />
</Parameters>
<Docs>
<param name="serviceName">Name of the service describing the downstream web API. There can
be several configuration named sections mapped to a <see cref="T:Microsoft.Identity.Web.DownstreamWebApiOptions" />,
each for one downstream web API. You can pass-in null, but in that case <paramref name="downstreamWebApiOptionsOverride" />
needs to be set.</param>
<param name="authenticationScheme">Authentication scheme. If null, will use OpenIdConnectDefault.AuthenticationScheme
if called from a web app, and JwtBearerDefault.AuthenticationScheme if called from a web API.</param>
<param name="downstreamWebApiOptionsOverride">Overrides the options proposed in the configuration described
by <paramref name="serviceName" />.</param>
<param name="content">HTTP content in the case where <see cref="P:Microsoft.Identity.Web.DownstreamWebApiOptions.HttpMethod" /> is
<see cref="P:System.Net.Http.HttpMethod.Patch" />, <see cref="P:System.Net.Http.HttpMethod.Post" />, <see cref="P:System.Net.Http.HttpMethod.Put" />.</param>
<summary>
Calls the downstream web API for the app, with the required scopes.
</summary>
<returns>An <see cref="T:System.Net.Http.HttpResponseMessage" /> that the application will process.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CallWebApiForUserAsync">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> CallWebApiForUserAsync (string serviceName, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? calledDownstreamWebApiOptionsOverride = default, System.Security.Claims.ClaimsPrincipal? user = default, System.Net.Http.StringContent? content = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class System.Net.Http.HttpResponseMessage> CallWebApiForUserAsync(string serviceName, class System.Action`1<class Microsoft.Identity.Web.DownstreamWebApiOptions> calledDownstreamWebApiOptionsOverride, class System.Security.Claims.ClaimsPrincipal user, class System.Net.Http.StringContent content) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.IDownstreamWebApi.CallWebApiForUserAsync(System.String,System.Action{Microsoft.Identity.Web.DownstreamWebApiOptions},System.Security.Claims.ClaimsPrincipal,System.Net.Http.StringContent)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CallWebApiForUserAsync (serviceName As String, Optional calledDownstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional user As ClaimsPrincipal = Nothing, Optional content As StringContent = Nothing) As Task(Of HttpResponseMessage)" />
<MemberSignature Language="F#" Value="abstract member CallWebApiForUserAsync : string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Security.Claims.ClaimsPrincipal * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>
override this.CallWebApiForUserAsync : string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Security.Claims.ClaimsPrincipal * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>" Usage="iDownstreamWebApi.CallWebApiForUserAsync (serviceName, calledDownstreamWebApiOptionsOverride, user, content)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serviceName" Type="System.String" />
<Parameter Name="calledDownstreamWebApiOptionsOverride" Type="System.Action<Microsoft.Identity.Web.DownstreamWebApiOptions>" />
<Parameter Name="user" Type="System.Security.Claims.ClaimsPrincipal" />
<Parameter Name="content" Type="System.Net.Http.StringContent" />
</Parameters>
<Docs>
<param name="serviceName">Name of the service describing the downstream web API. There can
be several configuration named sections mapped to a <see cref="T:Microsoft.Identity.Web.DownstreamWebApiOptions" />,
each for one downstream web API. You can pass-in null, but in that case <paramref name="calledDownstreamWebApiOptionsOverride" />
needs to be set.</param>
<param name="calledDownstreamWebApiOptionsOverride">Overrides the options proposed in the configuration described
by <paramref name="serviceName" />.</param>
<param name="user">[Optional] Claims representing a user. This is useful on platforms like Blazor
or Azure Signal R, where the HttpContext is not available. In other platforms, the library
will find the user from the HttpContext.</param>
<param name="content">HTTP context in the case where <see cref="P:Microsoft.Identity.Web.DownstreamWebApiOptions.HttpMethod" /> is
<see cref="P:System.Net.Http.HttpMethod.Patch" />, <see cref="P:System.Net.Http.HttpMethod.Post" />, <see cref="P:System.Net.Http.HttpMethod.Put" />.</param>
<summary>
Calls the downstream web API for the user, based on a description of the
downstream web API in the configuration.
</summary>
<returns>An <see cref="T:System.Net.Http.HttpResponseMessage" /> that the application will process.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CallWebApiForUserAsync">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> CallWebApiForUserAsync (string serviceName, string? authenticationScheme, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? calledDownstreamWebApiOptionsOverride = default, System.Security.Claims.ClaimsPrincipal? user = default, System.Net.Http.StringContent? content = default);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<class System.Net.Http.HttpResponseMessage> CallWebApiForUserAsync(string serviceName, string authenticationScheme, class System.Action`1<class Microsoft.Identity.Web.DownstreamWebApiOptions> calledDownstreamWebApiOptionsOverride, class System.Security.Claims.ClaimsPrincipal user, class System.Net.Http.StringContent content) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.IDownstreamWebApi.CallWebApiForUserAsync(System.String,System.String,System.Action{Microsoft.Identity.Web.DownstreamWebApiOptions},System.Security.Claims.ClaimsPrincipal,System.Net.Http.StringContent)" />
<MemberSignature Language="VB.NET" Value="Public Function CallWebApiForUserAsync (serviceName As String, authenticationScheme As String, Optional calledDownstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional user As ClaimsPrincipal = Nothing, Optional content As StringContent = Nothing) As Task(Of HttpResponseMessage)" />
<MemberSignature Language="F#" Value="abstract member CallWebApiForUserAsync : string * string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Security.Claims.ClaimsPrincipal * System.Net.Http.StringContent -> System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage>" Usage="iDownstreamWebApi.CallWebApiForUserAsync (serviceName, authenticationScheme, calledDownstreamWebApiOptionsOverride, user, content)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage></ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serviceName" Type="System.String" />
<Parameter Name="authenticationScheme" Type="System.String" />
<Parameter Name="calledDownstreamWebApiOptionsOverride" Type="System.Action<Microsoft.Identity.Web.DownstreamWebApiOptions>" />
<Parameter Name="user" Type="System.Security.Claims.ClaimsPrincipal" />
<Parameter Name="content" Type="System.Net.Http.StringContent" />
</Parameters>
<Docs>
<param name="serviceName">Name of the service describing the downstream web API. There can
be several configuration named sections mapped to a <see cref="T:Microsoft.Identity.Web.DownstreamWebApiOptions" />,
each for one downstream web API. You can pass-in null, but in that case <paramref name="calledDownstreamWebApiOptionsOverride" />
needs to be set.</param>
<param name="authenticationScheme">Authentication scheme. If null, will use OpenIdConnectDefault.AuthenticationScheme
if called from a web app, and JwtBearerDefault.AuthenticationScheme if called from a web API.</param>
<param name="calledDownstreamWebApiOptionsOverride">Overrides the options proposed in the configuration described
by <paramref name="serviceName" />.</param>
<param name="user">[Optional] Claims representing a user. This is useful on platforms like Blazor
or Azure Signal R, where the HttpContext is not available. In other platforms, the library
will find the user from the HttpContext.</param>
<param name="content">HTTP context in the case where <see cref="P:Microsoft.Identity.Web.DownstreamWebApiOptions.HttpMethod" /> is
<see cref="P:System.Net.Http.HttpMethod.Patch" />, <see cref="P:System.Net.Http.HttpMethod.Post" />, <see cref="P:System.Net.Http.HttpMethod.Put" />.</param>
<summary>
Calls the downstream web API for the user, based on a description of the
downstream web API in the configuration.
</summary>
<returns>An <see cref="T:System.Net.Http.HttpResponseMessage" /> that the application will process.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="CallWebApiForUserAsync<TInput,TOutput>">
<MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task<TOutput?> CallWebApiForUserAsync<TInput,TOutput> (string serviceName, TInput input, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? downstreamWebApiOptionsOverride = default, System.Security.Claims.ClaimsPrincipal? user = default) where TOutput : class;" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<!!TOutput> CallWebApiForUserAsync<TInput, class TOutput>(string serviceName, !!TInput input, class System.Action`1<class Microsoft.Identity.Web.DownstreamWebApiOptions> downstreamWebApiOptionsOverride, class System.Security.Claims.ClaimsPrincipal user) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.IDownstreamWebApi.CallWebApiForUserAsync``2(System.String,``0,System.Action{Microsoft.Identity.Web.DownstreamWebApiOptions},System.Security.Claims.ClaimsPrincipal)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function CallWebApiForUserAsync(Of TInput, TOutput) (serviceName As String, input As TInput, Optional downstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional user As ClaimsPrincipal = Nothing) As Task(Of TOutput)" />
<MemberSignature Language="F#" Value="abstract member CallWebApiForUserAsync : string * 'Input * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'Output (requires 'Output : null)> (requires 'Output : null)
override this.CallWebApiForUserAsync : string * 'Input * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'Output (requires 'Output : null)> (requires 'Output : null)" Usage="iDownstreamWebApi.CallWebApiForUserAsync (serviceName, input, downstreamWebApiOptionsOverride, user)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize<TValue>(TValue, JsonSerializerOptions).")]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize<TValue>(TValue, JsonSerializerOptions).")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<TOutput></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TInput" />
<TypeParameter Name="TOutput">
<Constraints>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="serviceName" Type="System.String" />
<Parameter Name="input" Type="TInput" />
<Parameter Name="downstreamWebApiOptionsOverride" Type="System.Action<Microsoft.Identity.Web.DownstreamWebApiOptions>" />
<Parameter Name="user" Type="System.Security.Claims.ClaimsPrincipal" />
</Parameters>
<Docs>
<typeparam name="TInput">Input type.</typeparam>
<typeparam name="TOutput">Output type.</typeparam>
<param name="serviceName">Name of the service describing the downstream web API. There can
be several configuration named sections mapped to a <see cref="T:Microsoft.Identity.Web.DownstreamWebApiOptions" />,
each for one downstream web API. You can pass-in null, but in that case <paramref name="downstreamWebApiOptionsOverride" />
needs to be set.</param>
<param name="input">Input parameter to the downstream web API.</param>
<param name="downstreamWebApiOptionsOverride">Overrides the options proposed in the configuration described
by <paramref name="serviceName" />.</param>
<param name="user">[Optional] Claims representing a user. This is useful in platforms like Blazor
or Azure Signal R, where the HttpContext is not available. In other platforms, the library
will find the user from the HttpContext.</param>
<summary>
Calls a downstream web API consuming JSON with some data and returns data.
</summary>
<returns>The value returned by the downstream web API.</returns>
<remarks>To be added.</remarks>
<example>
A list method that returns an IEnumerable<MyItem>>.
<code>
public Task<IEnumerable<MyItem>> GetAsync()
{
return _downstreamWebApi.CallWebApiForUserAsync<object, IEnumerable<MyItem>>(
ServiceName,
null,
options =>
{
options.RelativePath = $"api/todolist";
});
}
</code>
Example of editing.
<code>
public Task<MyItem> EditAsync(MyItem myItem)
{
return _downstreamWebApi.CallWebApiForUserAsync<MyItem, MyItem>(
ServiceName,
nyItem,
options =>
{
options.HttpMethod = HttpMethod.Patch;
options.RelativePath = $"api/todolist/{myItem.Id}";
});
}
</code></example>
</Docs>
</Member>
<Member MemberName="CallWebApiForUserAsync<TInput,TOutput>">
<MemberSignature Language="C#" Value="public System.Threading.Tasks.Task<TOutput?> CallWebApiForUserAsync<TInput,TOutput> (string serviceName, TInput input, string? authenticationScheme, Action<Microsoft.Identity.Web.DownstreamWebApiOptions>? downstreamWebApiOptionsOverride = default, System.Security.Claims.ClaimsPrincipal? user = default) where TOutput : class;" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1<!!TOutput> CallWebApiForUserAsync<TInput, class TOutput>(string serviceName, !!TInput input, string authenticationScheme, class System.Action`1<class Microsoft.Identity.Web.DownstreamWebApiOptions> downstreamWebApiOptionsOverride, class System.Security.Claims.ClaimsPrincipal user) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.IDownstreamWebApi.CallWebApiForUserAsync``2(System.String,``0,System.String,System.Action{Microsoft.Identity.Web.DownstreamWebApiOptions},System.Security.Claims.ClaimsPrincipal)" />
<MemberSignature Language="VB.NET" Value="Public Function CallWebApiForUserAsync(Of TInput, TOutput) (serviceName As String, input As TInput, authenticationScheme As String, Optional downstreamWebApiOptionsOverride As Action(Of DownstreamWebApiOptions) = Nothing, Optional user As ClaimsPrincipal = Nothing) As Task(Of TOutput)" />
<MemberSignature Language="F#" Value="abstract member CallWebApiForUserAsync : string * 'Input * string * Action<Microsoft.Identity.Web.DownstreamWebApiOptions> * System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'Output (requires 'Output : null)> (requires 'Output : null)" Usage="iDownstreamWebApi.CallWebApiForUserAsync (serviceName, input, authenticationScheme, downstreamWebApiOptionsOverride, user)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.20.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize<TValue>(TValue, JsonSerializerOptions).")]</AttributeName>
<AttributeName Language="F#">[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Calls System.Text.Json.JsonSerializer.Serialize<TValue>(TValue, JsonSerializerOptions).")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Threading.Tasks.Task<TOutput></ReturnType>
</ReturnValue>
<TypeParameters>
<TypeParameter Name="TInput" />
<TypeParameter Name="TOutput">
<Constraints>
<ParameterAttribute>ReferenceTypeConstraint</ParameterAttribute>
</Constraints>
</TypeParameter>
</TypeParameters>
<Parameters>
<Parameter Name="serviceName" Type="System.String" />
<Parameter Name="input" Type="TInput" />
<Parameter Name="authenticationScheme" Type="System.String" />
<Parameter Name="downstreamWebApiOptionsOverride" Type="System.Action<Microsoft.Identity.Web.DownstreamWebApiOptions>" />
<Parameter Name="user" Type="System.Security.Claims.ClaimsPrincipal" />
</Parameters>
<Docs>
<typeparam name="TInput">Input type.</typeparam>
<typeparam name="TOutput">Output type.</typeparam>
<param name="serviceName">Name of the service describing the downstream web API. There can
be several configuration named sections mapped to a <see cref="T:Microsoft.Identity.Web.DownstreamWebApiOptions" />,
each for one downstream web API. You can pass-in null, but in that case <paramref name="downstreamWebApiOptionsOverride" />
needs to be set.</param>
<param name="input">Input parameter to the downstream web API.</param>
<param name="authenticationScheme">Authentication scheme. If null, will use OpenIdConnectDefault.AuthenticationScheme
if called from a web app, and JwtBearerDefault.AuthenticationScheme if called from a web API.</param>
<param name="downstreamWebApiOptionsOverride">Overrides the options proposed in the configuration described
by <paramref name="serviceName" />.</param>
<param name="user">[Optional] Claims representing a user. This is useful in platforms like Blazor
or Azure Signal R, where the HttpContext is not available. In other platforms, the library
will find the user from the HttpContext.</param>
<summary>
Calls a downstream web API consuming JSON with some data and returns data.
</summary>
<returns>The value returned by the downstream web API.</returns>
<remarks>To be added.</remarks>
<example>
A list method that returns an IEnumerable<MyItem>>.
<code>
public Task<IEnumerable<MyItem>> GetAsync()
{
return _downstreamWebApi.CallWebApiForUserAsync<object, IEnumerable<MyItem>>(
ServiceName,
null,
options =>
{
options.RelativePath = $"api/todolist";
});
}
</code>
Example of editing.
<code>
public Task<MyItem> EditAsync(MyItem myItem)
{
return _downstreamWebApi.CallWebApiForUserAsync<MyItem, MyItem>(
ServiceName,
nyItem,
options =>
{
options.HttpMethod = HttpMethod.Patch;
options.RelativePath = $"api/todolist/{myItem.Id}";
});
}
</code></example>
</Docs>
</Member>
</Members>
</Type>