Aracılığıyla paylaş


RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions> Sınıf

Tanım

Kullanıcının kimliğini doğrulamak için IRemoteAuthenticationService<TRemoteAuthenticationState> JS birlikte çalışma kullanan için varsayılan uygulama.

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)

Tür Parametreleri

TRemoteAuthenticationState

Kimlik doğrulama işlemleri arasında korunacak durum.

TAccount

türü RemoteUserAccount.

TProviderOptions

Kimlik doğrulama işlemlerini işleyen temel JavaScript kitaplığına geçirilecek seçenekler.

Devralma
RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions>
Uygulamalar

Oluşturucular

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

Yeni bir örnek başlatır.

RemoteAuthenticationService<TRemoteAuthenticationState,TAccount, TProviderOptions>(IJSRuntime, IOptionsSnapshot<RemoteAuthenticationOptions<TProviderOptions>>, NavigationManager, AccountClaimsPrincipalFactory<TAccount>)
Geçersiz.

Yeni bir örnek başlatır.

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

Yeni bir örnek başlatır.

Özellikler

AccountClaimsPrincipalFactory

AccountClaimsPrincipalFactory<TAccount> için hesaplarını ile eşlerClaimsPrincipal.

JsRuntime

IJSRuntime JavaScript birlikte çalışma işlemlerini gerçekleştirmek için kullanılacak öğesini alır.

Navigation

Mutlak url'leri NavigationManager hesaplamak için kullanılan değerini alır.

Options

Kimlik doğrulama işlemlerini işleyen temel JavaScript kitaplığı seçeneklerini alır.

Yöntemler

CompleteSignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Yeniden yönlendirme işlemi ve ardından uygulamadaki bir sayfaya yeniden yönlendirme geri çağırma yoluyla uygulama kaynağının dışında gerçekleştirilen bir kullanıcı için oturum açma işlemini tamamlar.

CompleteSignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Yeniden yönlendirme işlemi ve ardından uygulamadaki bir sayfaya yeniden yönlendirme geri çağırma yoluyla uygulama kaynağının dışında gerçekleştirildiğinde kullanıcının oturumu kapatma işlemini tamamlar.

GetAuthenticatedUser()

JavaScript birlikte çalışabilirlik kullanarak kullanılan geçerli kimliği doğrulanmış örneği alır.

GetAuthenticationStateAsync()

Zaman uyumsuz olarak geçerli kullanıcıyı tanımlayan bir AuthenticationState alır.

NotifyAuthenticationStateChanged(Task<AuthenticationState>)

Olayı tetikler AuthenticationStateChanged .

(Devralındığı yer: AuthenticationStateProvider)
RequestAccessToken()

Geçerli kullanıcı için varsayılan izin kümesine sahip bir erişim belirteci almaya çalışır.

RequestAccessToken(AccessTokenRequestOptions)

içinde AccessTokenRequestOptionsbelirtilen seçeneklerle bir erişim belirteci almaya çalışır.

SignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Bir kullanıcıda oturum açar.

SignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

Kullanıcının oturumunu kapatma.

Ekinlikler

AuthenticationStateChanged

değiştiğinde AuthenticationState bildirim sağlayan bir olay. Örneğin, bir kullanıcı oturum açtığında veya oturum açtığında bu olay tetiklenebilir.

(Devralındığı yer: AuthenticationStateProvider)

Şunlara uygulanır