RequiredScopeOrAppPermissionExtensions.RequireScopeOrAppPermission<TBuilder> Method

Definition

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.

Applies to