Share via


TypedResults.Challenge(AuthenticationProperties, IList<String>) Metodo

Definizione

Crea un oggetto ChallengeHttpResult che in esecuzione richiama ChallengeAsync(HttpContext, String, AuthenticationProperties).

Il comportamento di questo metodo dipende dall'oggetto IAuthenticationService in uso. Status401Unauthorized e Status403Forbidden sono tra i risultati di stato probabili.

public static Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult Challenge (Microsoft.AspNetCore.Authentication.AuthenticationProperties? properties = default, System.Collections.Generic.IList<string>? authenticationSchemes = default);
static member Challenge : Microsoft.AspNetCore.Authentication.AuthenticationProperties * System.Collections.Generic.IList<string> -> Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult
Public Shared Function Challenge (Optional properties As AuthenticationProperties = Nothing, Optional authenticationSchemes As IList(Of String) = Nothing) As ChallengeHttpResult

Parametri

properties
AuthenticationProperties

AuthenticationProperties usato per eseguire la sfida di autenticazione.

authenticationSchemes
IList<String>

Schemi di autenticazione da sfidare.

Restituisce

Oggetto creato ChallengeHttpResult per la risposta.

Si applica a