Condividi tramite


AuthorizationMiddlewareResultHandler.HandleAsync Metodo

Definizione

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

public:
 virtual 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
override this.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

Il middleware successivo nella pipeline dell'applicazione. Le implementazioni potrebbero non richiamare questa operazione se l'autorizzazione non ha avuto esito positivo.

context
HttpContext

Oggetto HttpContext.

policy
AuthorizationPolicy

Oggetto AuthorizationPolicy per la risorsa.

authorizeResult
PolicyAuthorizationResult

Risultato dell'autorizzazione.

Restituisce

Implementazioni

Si applica a