ServerAuthenticationStateProvider 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
AuthenticationStateProvider,用於伺服器端 Blazor。
public ref class ServerAuthenticationStateProvider : Microsoft::AspNetCore::Components::Authorization::AuthenticationStateProvider, Microsoft::AspNetCore::Components::Authorization::IHostEnvironmentAuthenticationStateProvider
public class ServerAuthenticationStateProvider : Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider, Microsoft.AspNetCore.Components.Authorization.IHostEnvironmentAuthenticationStateProvider
type ServerAuthenticationStateProvider = class
inherit AuthenticationStateProvider
interface IHostEnvironmentAuthenticationStateProvider
Public Class ServerAuthenticationStateProvider
Inherits AuthenticationStateProvider
Implements IHostEnvironmentAuthenticationStateProvider
- 繼承
- 衍生
- 實作
建構函式
| 名稱 | Description |
|---|---|
| ServerAuthenticationStateProvider() |
AuthenticationStateProvider,用於伺服器端 Blazor。 |
方法
| 名稱 | Description |
|---|---|
| GetAuthenticationStateAsync() |
以非同步方式取得 AuthenticationState 描述目前使用者的 。 |
| NotifyAuthenticationStateChanged(Task<AuthenticationState>) |
引發 AuthenticationStateChanged 事件。 (繼承來源 AuthenticationStateProvider) |
| SetAuthenticationState(Task<AuthenticationState>) |
提供更新的 AuthenticationStateProvider 驗證狀態資料給 。 |
事件
| 名稱 | Description |
|---|---|
| AuthenticationStateChanged |
事件,可在 變更時 AuthenticationState 提供通知。 例如,如果使用者登入或登出,可能會引發此事件。 (繼承來源 AuthenticationStateProvider) |