Share via


TypedResults.Challenge(AuthenticationProperties, IList<String>) 方法

定義

ChallengeHttpResult建立在執行時叫用 的 ChallengeAsync(HttpContext, String, AuthenticationProperties)

這個方法的行為取決於 IAuthenticationService 使用中的 。 Status401UnauthorizedStatus403Forbidden 在可能的狀態結果之間。

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

參數

properties
AuthenticationProperties

AuthenticationProperties 用來執行驗證挑戰。

authenticationSchemes
IList<String>

要挑戰的驗證配置。

傳回

為回應建立 ChallengeHttpResult 的 。

適用於