Sdílet prostřednictvím


PolicyEvaluator.AuthenticateAsync(AuthorizationPolicy, HttpContext) Metoda

Definice

Provede ověřování pro AuthenticationSchemes a nastaví výslednou ClaimsPrincipal možnost na User. Pokud nejsou nastavena žádná schémata, jedná se o no-op.

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)

Parametry

context
HttpContext

Hodnota HttpContext

Návraty

Success(AuthenticationTicket) pokud se nepovedlo ověřit všechna schémata určená nástrojem AuthenticationSchemes .

Implementuje

Platí pro