RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions> クラス

定義

JS 相互運用機能を IRemoteAuthenticationService<TRemoteAuthenticationState> 使用してユーザーを認証する の既定の実装。

generic <typename TRemoteAuthenticationState, typename TAccount, typename TProviderOptions>
 where TRemoteAuthenticationState : RemoteAuthenticationState where TAccount : RemoteUserAccount where TProviderOptions : gcnew()public ref class RemoteAuthenticationService : Microsoft::AspNetCore::Components::Authorization::AuthenticationStateProvider, Microsoft::AspNetCore::Components::WebAssembly::Authentication::IAccessTokenProvider, Microsoft::AspNetCore::Components::WebAssembly::Authentication::IRemoteAuthenticationService<TRemoteAuthenticationState>
public class RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions> : Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider, Microsoft.AspNetCore.Components.WebAssembly.Authentication.IAccessTokenProvider, Microsoft.AspNetCore.Components.WebAssembly.Authentication.IRemoteAuthenticationService<TRemoteAuthenticationState> where TRemoteAuthenticationState : RemoteAuthenticationState where TAccount : RemoteUserAccount where TProviderOptions : new()
type RemoteAuthenticationService<'RemoteAuthenticationState, 'Account, 'ProviderOptions (requires 'RemoteAuthenticationState :> RemoteAuthenticationState and 'Account :> RemoteUserAccount and 'ProviderOptions : (new : unit -> 'ProviderOptions))> = class
    inherit AuthenticationStateProvider
    interface IRemoteAuthenticationService<'RemoteAuthenticationState (requires 'RemoteAuthenticationState :> RemoteAuthenticationState)>
    interface IAccessTokenProvider
Public Class RemoteAuthenticationService(Of TRemoteAuthenticationState, TAccount, TProviderOptions)
Inherits AuthenticationStateProvider
Implements IAccessTokenProvider, IRemoteAuthenticationService(Of TRemoteAuthenticationState)

型パラメーター

TRemoteAuthenticationState

認証操作全体で保持する状態。

TAccount

RemoteUserAccount の型。

TProviderOptions

認証操作を処理する基になる JavaScript ライブラリに渡すオプション。

継承
RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions>
実装

コンストラクター

RemoteAuthenticationService<TRemoteAuthenticationState,TAccount, TProviderOptions>(IJSRuntime, IOptions<RemoteAuthenticationOptions<TProviderOptions>>, NavigationManager, AccountClaimsPrincipalFactory<TAccount>)

新しいインスタンスを初期化します。

RemoteAuthenticationService<TRemoteAuthenticationState,TAccount, TProviderOptions>(IJSRuntime, IOptionsSnapshot<RemoteAuthenticationOptions<TProviderOptions>>, NavigationManager, AccountClaimsPrincipalFactory<TAccount>)
古い.

新しいインスタンスを初期化します。

RemoteAuthenticationService<TRemoteAuthenticationState,TAccount, TProviderOptions>(IJSRuntime, IOptionsSnapshot<RemoteAuthenticationOptions<TProviderOptions>>, NavigationManager, AccountClaimsPrincipalFactory<TAccount>, ILogger<RemoteAuthenticationService<TRemoteAuthenticationState, TAccount,TProviderOptions>>)

新しいインスタンスを初期化します。

プロパティ

AccountClaimsPrincipalFactory

アカウントを AccountClaimsPrincipalFactory<TAccount> にマップする を ClaimsPrincipal取得します。

JsRuntime

IJSRuntime JavaScript 相互運用操作の実行に使用する を取得します。

Navigation

絶対 URL の NavigationManager 計算に使用される を取得します。

Options

認証操作を処理する基になる JavaScript ライブラリのオプションを取得します。

メソッド

CompleteSignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

リダイレクト操作の後にアプリケーション内のページへのリダイレクト コールバックを使用してアプリケーションの配信元の外部で実行された場合に、ユーザーのサインイン操作を完了します。

CompleteSignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

ユーザーがアプリケーションの配信元の外部でリダイレクト操作を実行し、その後にアプリケーション内のページへのリダイレクト コールバックを実行したときに、サインアウト操作を完了します。

GetAuthenticatedUser()

JavaScript 相互運用機能を使用して使用されている現在の認証済みを取得します。

GetAuthenticationStateAsync()

現在のユーザーを記述する を AuthenticationState 非同期に取得します。

NotifyAuthenticationStateChanged(Task<AuthenticationState>)

AuthenticationStateChanged イベントを発生させます。

(継承元 AuthenticationStateProvider)
RequestAccessToken()

アクセス許可の既定のセットを使用して、現在のユーザーのアクセス トークンの取得を試みます。

RequestAccessToken(AccessTokenRequestOptions)

で指定されたオプションを使用してアクセス トークンの取得を AccessTokenRequestOptions試みます。

SignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

ユーザーをサインインさせます。

SignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

ユーザーをサインアウトします。

イベント

AuthenticationStateChanged

が変更されたときに通知を提供する AuthenticationState イベント。 たとえば、ユーザーがログインまたはログアウトすると、このイベントが発生する可能性があります。

(継承元 AuthenticationStateProvider)

適用対象