Partager via


PolicyEvaluator.AuthenticateAsync(AuthorizationPolicy, HttpContext) Méthode

Définition

Effectue l’authentification pour AuthenticationSchemes et définit le résultat sur ClaimsPrincipalUser. Si aucun schéma n’est défini, il s’agit d’une opération non opérationnelle.

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Authentication::AuthenticateResult ^> ^ AuthenticateAsync(Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ policy, Microsoft::AspNetCore::Http::HttpContext ^ context);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult> AuthenticateAsync (Microsoft.AspNetCore.Authorization.AuthorizationPolicy policy, Microsoft.AspNetCore.Http.HttpContext context);
abstract member AuthenticateAsync : Microsoft.AspNetCore.Authorization.AuthorizationPolicy * Microsoft.AspNetCore.Http.HttpContext -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult>
override this.AuthenticateAsync : Microsoft.AspNetCore.Authorization.AuthorizationPolicy * Microsoft.AspNetCore.Http.HttpContext -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult>
Public Overridable Function AuthenticateAsync (policy As AuthorizationPolicy, context As HttpContext) As Task(Of AuthenticateResult)

Paramètres

context
HttpContext

L’HttpContextopérateur

Retours

Success(AuthenticationTicket) sauf si tous les schémas spécifiés par n’ont AuthenticationSchemes pas pu s’authentifier.

Implémente

S’applique à