TypedResults.Challenge(AuthenticationProperties, IList<String>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
ChallengeHttpResult建立在執行時叫用 的 ChallengeAsync(HttpContext, String, AuthenticationProperties) 。
這個方法的行為取決於 IAuthenticationService 使用中的 。 Status401Unauthorized 和 Status403Forbidden 在可能的狀態結果之間。
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 用來執行驗證挑戰。
傳回
為回應建立 ChallengeHttpResult 的 。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應