RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions> Třída

Definice

Výchozí implementace, IRemoteAuthenticationService<TRemoteAuthenticationState> která k ověření uživatele používá interop JS.

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)

Parametry typu

TRemoteAuthenticationState

Stav pro zachování napříč operacemi ověřování

TAccount

Typ .RemoteUserAccount

TProviderOptions

Možnosti, které se mají předat podkladové knihovně JavaScriptu, která zpracovává ověřovací operace.

Dědičnost
RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions>
Implementuje

Konstruktory

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

Inicializuje novou instanci.

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

Inicializuje novou instanci.

Vlastnosti

AccountClaimsPrincipalFactory

AccountClaimsPrincipalFactory<TAccount> Získá mapování účtů na ClaimsPrincipal.

JsRuntime

IJSRuntime Získá použití pro provádění operací interop JavaScriptu.

Navigation

NavigationManager Získá použité k výpočtu absolutních adres URL.

Options

Získá možnosti pro základní javascriptovou knihovnu zpracovávající operace ověřování.

Metody

CompleteSignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Dokončí operaci přihlášení pro uživatele, když se provede mimo původ aplikace prostřednictvím operace přesměrování následované zpětným voláním přesměrování na stránku v aplikaci.

CompleteSignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Dokončí operaci odhlášení pro uživatele, když se provede mimo původ aplikace prostřednictvím operace přesměrování následované zpětným voláním přesměrování na stránku v aplikaci.

GetAuthenticatedUser()

Získá aktuální ověřené použití pomocí interoperability JavaScriptu.

GetAuthenticationStateAsync()

Asynchronně získá popis AuthenticationState aktuálního uživatele.

NotifyAuthenticationStateChanged(Task<AuthenticationState>)

AuthenticationStateChanged Vyvolá událost.

(Zděděno od AuthenticationStateProvider)
RequestAccessToken()

Pokusí se získat přístupový token pro aktuálního uživatele s výchozí sadou oprávnění.

RequestAccessToken(AccessTokenRequestOptions)

Pokusí se získat přístupový token s možnostmi zadanými v AccessTokenRequestOptions.

SignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Přihlásí se k uživateli.

SignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Odhlásí uživatele.

událost

AuthenticationStateChanged

Událost, která poskytuje oznámení, když došlo ke AuthenticationState změně. Tato událost může být například vyvolána, pokud se uživatel přihlásí nebo odhlásí.

(Zděděno od AuthenticationStateProvider)

Platí pro