RequiredScopeOrAppPermissionExtensions.RequireScopeOrAppPermission<TBuilder> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method adds metadata to route endpoint to describe required scopes or app permissions. It's the imperative version of the [RequiredScopeOrAppPermission] attribute.
public static TBuilder RequireScopeOrAppPermission<TBuilder> (this TBuilder endpointConventionBuilder, string[] scope, string[] appPermission) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireScopeOrAppPermission : 'Builder * string[] * string[] -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireScopeOrAppPermission(Of TBuilder As IEndpointConventionBuilder) (endpointConventionBuilder As TBuilder, scope As String(), appPermission As String()) As TBuilder
Type Parameters
- TBuilder
Class implementing IEndpointConventionBuilder.
Parameters
- endpointConventionBuilder
- TBuilder
To customize the endpoints.
- scope
- String[]
Scope.
- appPermission
- String[]
App permission.
Returns
TBuilder
Builder.