Share via


RemoteAuthenticationService<TRemoteAuthenticationState,TAccount,TProviderOptions> 클래스

정의

에 대한 IRemoteAuthenticationService<TRemoteAuthenticationState> 기본 구현은 JS interop을 사용하여 사용자를 인증합니다.

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 interop 작업을 수행하는 데 사용할 을 가져옵니다.

Navigation

NavigationManager 절대 URL을 계산하는 데 사용되는 를 가져옵니다.

Options

인증 작업을 처리하는 기본 JavaScript 라이브러리에 대한 옵션을 가져옵니다.

메서드

CompleteSignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

리디렉션 작업과 애플리케이션의 페이지로 리디렉션 콜백을 통해 애플리케이션 원본 외부에서 수행될 때 사용자의 로그인 작업을 완료합니다.

CompleteSignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

리디렉션 작업과 애플리케이션의 페이지로 리디렉션 콜백을 통해 애플리케이션 원본 외부에서 수행될 때 사용자의 로그아웃 작업을 완료합니다.

GetAuthenticatedUser()

JavaScript interop을 사용하여 현재 인증된 를 가져옵니다.

GetAuthenticationStateAsync()

현재 사용자를 설명하는 를 AuthenticationState 비동기적으로 가져옵니다.

NotifyAuthenticationStateChanged(Task<AuthenticationState>)

AuthenticationStateChanged 이벤트를 발생시킵니다.

(다음에서 상속됨 AuthenticationStateProvider)
RequestAccessToken()

기본 사용 권한 집합을 사용하여 현재 사용자에 대한 액세스 토큰을 얻으려고 시도합니다.

RequestAccessToken(AccessTokenRequestOptions)

에 지정된 옵션을 사용하여 액세스 토큰을 얻으려고 시도합니다 AccessTokenRequestOptions.

SignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

사용자를 로그인합니다.

SignOutAsync(RemoteAuthenticationContext<TRemoteAuthenticationState>)

사용자를 로그아웃합니다.

이벤트

AuthenticationStateChanged

가 변경된 경우 AuthenticationState 알림을 제공하는 이벤트입니다. 예를 들어 사용자가 로그인하거나 로그아웃하는 경우 이 이벤트가 발생할 수 있습니다.

(다음에서 상속됨 AuthenticationStateProvider)

적용 대상