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)

适用于