Partilhar via


RequiredScopeOrAppPermissionExtensions Class

Definition

Extensions for building the required scope or app permission attribute during application startup.

public static class RequiredScopeOrAppPermissionExtensions
type RequiredScopeOrAppPermissionExtensions = class
Public Module RequiredScopeOrAppPermissionExtensions
Inheritance
RequiredScopeOrAppPermissionExtensions

Methods

AddRequiredScopeOrAppPermissionAuthorization(IServiceCollection)

This method adds support for the required scope or app permission attribute. It adds a default policy that adds a scope requirement or app permission requirement. This requirement looks for IAuthRequiredScopeOrAppPermissionMetadata on the current endpoint.

RequireScopeOrAppPermission<TBuilder>(TBuilder, String[], String[])

This method adds metadata to route endpoint to describe required scopes or app permissions. It's the imperative version of the [RequiredScopeOrAppPermission] attribute.

Applies to