Share via


ServerAuthenticationStateProvider 類別

定義

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
繼承
ServerAuthenticationStateProvider
衍生
實作

建構函式

ServerAuthenticationStateProvider()

AuthenticationStateProvider,用於伺服器端 Blazor。

方法

GetAuthenticationStateAsync()

以非同步方式取得 AuthenticationState 描述目前使用者的 。

NotifyAuthenticationStateChanged(Task<AuthenticationState>)

引發 AuthenticationStateChanged 事件。

(繼承來源 AuthenticationStateProvider)
SetAuthenticationState(Task<AuthenticationState>)

提供更新的 AuthenticationStateProvider 驗證狀態資料給 。

事件

AuthenticationStateChanged

事件,可在 變更時 AuthenticationState 提供通知。 例如,如果使用者登入或登出,可能會引發此事件。

(繼承來源 AuthenticationStateProvider)

適用於