Condividi tramite


IAuthorizationMiddlewareResultHandler.HandleAsync Metodo

Definizione

Valuta il requisito di autorizzazione ed elabora il risultato dell'autorizzazione.

public:
 System::Threading::Tasks::Task ^ HandleAsync(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Http::HttpContext ^ context, Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy, Microsoft::AspNetCore::Authorization::Policy::PolicyAuthorizationResult ^ authorizeResult);
public System.Threading.Tasks.Task HandleAsync (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult authorizeResult);
abstract member HandleAsync : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Http.HttpContext * Microsoft.AspNetCore.Authorization.AuthorizationPolicy * Microsoft.AspNetCore.Authorization.Policy.PolicyAuthorizationResult -> System.Threading.Tasks.Task
Public Function HandleAsync (next As RequestDelegate, context As HttpContext, policy As AuthorizationPolicy, authorizeResult As PolicyAuthorizationResult) As Task

Parametri

next
RequestDelegate

Middleware successivo nella pipeline dell'applicazione. Le implementazioni potrebbero non richiamarsi se l'autorizzazione non è riuscita.

context
HttpContext

Oggetto HttpContext.

policy
AuthorizationPolicy

Oggetto AuthorizationPolicy per la risorsa.

authorizeResult
PolicyAuthorizationResult

Risultato dell'autorizzazione.

Restituisce

Si applica a