Share via


TypedResults.Challenge(AuthenticationProperties, IList<String>) Méthode

Définition

Crée un qui, lors de ChallengeHttpResult l’exécution, ChallengeAsync(HttpContext, String, AuthenticationProperties)appelle .

Le comportement de cette méthode dépend du en cours d’utilisation IAuthenticationService . Status401Unauthorizedet Status403Forbidden font partie des résultats probables status.

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

Paramètres

properties
AuthenticationProperties

AuthenticationProperties utilisé pour effectuer la demande d’authentification.

authenticationSchemes
IList<String>

Schémas d’authentification à contester.

Retours

créé ChallengeHttpResult pour la réponse.

S’applique à