-
Notifications
You must be signed in to change notification settings - Fork 25
/
ScopesRequiredHttpContextExtensions.xml
91 lines (91 loc) 路 5.29 KB
/
ScopesRequiredHttpContextExtensions.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
<Type Name="ScopesRequiredHttpContextExtensions" FullName="Microsoft.Identity.Web.Resource.ScopesRequiredHttpContextExtensions">
<TypeSignature Language="C#" Value="public static class ScopesRequiredHttpContextExtensions" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract sealed beforefieldinit ScopesRequiredHttpContextExtensions extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.Identity.Web.Resource.ScopesRequiredHttpContextExtensions" />
<TypeSignature Language="VB.NET" Value="Public Module ScopesRequiredHttpContextExtensions" />
<TypeSignature Language="F#" Value="type ScopesRequiredHttpContextExtensions = class" />
<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>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>
Extension class providing the extension
methods for <see cref="T:System.Net.Http.HttpContent" /> that
can be used in web APIs to validate scopes in controller actions.
We recommend using instead the RequiredScope Attribute on the controller, the page or the action.
See https://aka.ms/ms-id-web/required-scope-attribute.
</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
<Member MemberName="VerifyUserHasAnyAcceptedScope">
<MemberSignature Language="C#" Value="public static void VerifyUserHasAnyAcceptedScope (this Microsoft.AspNetCore.Http.HttpContext context, params string[] acceptedScopes);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig void VerifyUserHasAnyAcceptedScope(class Microsoft.AspNetCore.Http.HttpContext context, string[] acceptedScopes) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.Identity.Web.Resource.ScopesRequiredHttpContextExtensions.VerifyUserHasAnyAcceptedScope(Microsoft.AspNetCore.Http.HttpContext,System.String[])" />
<MemberSignature Language="VB.NET" Value="<Extension()>
Public Sub VerifyUserHasAnyAcceptedScope (context As HttpContext, ParamArray acceptedScopes As String())" />
<MemberSignature Language="F#" Value="static member VerifyUserHasAnyAcceptedScope : Microsoft.AspNetCore.Http.HttpContext * string[] -> unit" Usage="Microsoft.Identity.Web.Resource.ScopesRequiredHttpContextExtensions.VerifyUserHasAnyAcceptedScope (context, acceptedScopes)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.Identity.Web</AssemblyName>
<AssemblyVersion>2.19.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="context" Type="Microsoft.AspNetCore.Http.HttpContext" RefType="this" />
<Parameter Name="acceptedScopes" Type="System.String[]">
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ParamArray]</AttributeName>
<AttributeName Language="F#">[<System.ParamArray>]</AttributeName>
</Attribute>
</Attributes>
</Parameter>
</Parameters>
<Docs>
<param name="context">HttpContext (from the controller).</param>
<param name="acceptedScopes">Scopes accepted by this web API.</param>
<summary>
When applied to an <see cref="T:Microsoft.AspNetCore.Http.HttpContext" />, verifies that the user authenticated in the
web API has any of the accepted scopes.
If there is no authenticated user, the response is a 401 (Unauthenticated).
If the authenticated user does not have any of these <paramref name="acceptedScopes" />, the
method updates the HTTP response providing a status code 403 (Forbidden)
and writes to the response body a message telling which scopes are expected in the token.
We recommend using instead the RequiredScope Attribute on the controller, the page or the action.
See https://aka.ms/ms-id-web/required-scope-attribute.
</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>