WebAssemblyAuthenticationServiceCollectionExtensions.AddRemoteAuthentication Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| AddRemoteAuthentication<TRemoteAuthenticationState,TAccount,TProviderOptions>(IServiceCollection) |
Adds support for authentication for SPA applications using the given |
| AddRemoteAuthentication<TRemoteAuthenticationState,TAccount,TProviderOptions>(IServiceCollection, Action<RemoteAuthenticationOptions<TProviderOptions>>) |
Adds support for authentication for SPA applications using the given |
AddRemoteAuthentication<TRemoteAuthenticationState,TAccount,TProviderOptions>(IServiceCollection)
Adds support for authentication for SPA applications using the given TProviderOptions and
TRemoteAuthenticationState.
public static Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<TRemoteAuthenticationState,TAccount> AddRemoteAuthentication<TRemoteAuthenticationState,TAccount,TProviderOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services) where TRemoteAuthenticationState : Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState where TAccount : Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount where TProviderOptions : class, new();
static member AddRemoteAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<'RemoteAuthenticationState, 'Account (requires 'RemoteAuthenticationState :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState and 'Account :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount)> (requires 'RemoteAuthenticationState :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState and 'Account :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount and 'ProviderOptions : null and 'ProviderOptions : (new : unit -> 'ProviderOptions))
<Extension()>
Public Function AddRemoteAuthentication(Of TRemoteAuthenticationState As RemoteAuthenticationState, TAccount As RemoteAuthenticationState, TProviderOptions As RemoteAuthenticationState) (services As IServiceCollection) As IRemoteAuthenticationBuilder(Of TRemoteAuthenticationState, TAccount)
Type Parameters
- TRemoteAuthenticationState
The state to be persisted across authentication operations.
- TAccount
The account type.
- TProviderOptions
The configuration options of the underlying provider being used for handling the authentication operations.
Parameters
- services
- IServiceCollection
The IServiceCollection to add the services to.
Returns
The IServiceCollection where the services were registered.
Applies to
AddRemoteAuthentication<TRemoteAuthenticationState,TAccount,TProviderOptions>(IServiceCollection, Action<RemoteAuthenticationOptions<TProviderOptions>>)
Adds support for authentication for SPA applications using the given TProviderOptions and
TRemoteAuthenticationState.
public static Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<TRemoteAuthenticationState,TAccount> AddRemoteAuthentication<TRemoteAuthenticationState,TAccount,TProviderOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<TProviderOptions>> configure) where TRemoteAuthenticationState : Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState where TAccount : Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount where TProviderOptions : class, new();
static member AddRemoteAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationOptions<'ProviderOptions>> -> Microsoft.Extensions.DependencyInjection.IRemoteAuthenticationBuilder<'RemoteAuthenticationState, 'Account (requires 'RemoteAuthenticationState :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState and 'Account :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount)> (requires 'RemoteAuthenticationState :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationState and 'Account :> Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteUserAccount and 'ProviderOptions : null and 'ProviderOptions : (new : unit -> 'ProviderOptions))
<Extension()>
Public Function AddRemoteAuthentication(Of TRemoteAuthenticationState As RemoteAuthenticationState, TAccount As RemoteAuthenticationState, TProviderOptions As RemoteAuthenticationState) (services As IServiceCollection, configure As Action(Of RemoteAuthenticationOptions(Of TProviderOptions))) As IRemoteAuthenticationBuilder(Of TRemoteAuthenticationState, TAccount)
Type Parameters
- TRemoteAuthenticationState
The state to be persisted across authentication operations.
- TAccount
The account type.
- TProviderOptions
The configuration options of the underlying provider being used for handling the authentication operations.
Parameters
- services
- IServiceCollection
The IServiceCollection to add the services to.
- configure
- Action<RemoteAuthenticationOptions<TProviderOptions>>
An action that will configure the RemoteAuthenticationOptions<TRemoteAuthenticationProviderOptions>.
Returns
The IServiceCollection where the services were registered.