Udostępnij przez


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

Definicja

Tworzy element ChallengeHttpResult w przypadku wykonywania wywołuje element ChallengeAsync(HttpContext, String, AuthenticationProperties).

Zachowanie tej metody zależy od używanej IAuthenticationService metody. Status401Unauthorized i Status403Forbidden są jednymi z prawdopodobnych wyników stanu.

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

Parametry

properties
AuthenticationProperties

AuthenticationProperties służy do wykonywania zadania uwierzytelniania.

authenticationSchemes
IList<String>

Schematy uwierzytelniania do zakwestionowania.

Zwraca

ChallengeHttpResult Utworzony dla odpowiedzi.

Dotyczy