BlazorAuthenticationChallengeHandler 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
處理 Blazor Server 元件的認證挑戰。 提供增量同意與條件存取情境的功能。
public BlazorAuthenticationChallengeHandler(Microsoft.AspNetCore.Components.NavigationManager navigation, Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider authenticationStateProvider, Microsoft.Extensions.Configuration.IConfiguration configuration);
new Microsoft.Identity.Web.BlazorAuthenticationChallengeHandler : Microsoft.AspNetCore.Components.NavigationManager * Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Identity.Web.BlazorAuthenticationChallengeHandler
Public Sub New (navigation As NavigationManager, authenticationStateProvider As AuthenticationStateProvider, configuration As IConfiguration)
參數
- navigation
- NavigationManager
- authenticationStateProvider
- AuthenticationStateProvider
- configuration
- IConfiguration
備註
此處理器專為需要從元件程式碼發起認證挑戰的 Blazor Server 情境設計。 它支援增量同意(請求額外範圍)及條件存取(處理升級驗證)。 結合此 MapLoginAndLogout(IEndpointRouteBuilder) 功能,使 Blazor Server 應用程式能實現無縫的認證流程。