WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization 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.
Serializes the AuthenticationState returned by the server-side AuthenticationStateProvider using PersistentComponentState for use by interactive WebAssembly components via a deserializing client-side AuthenticationStateProvider which can be added by calling AddAuthenticationStateDeserialization from the Microsoft.AspNetCore.Components.WebAssembly.Authentication package in the client project.
public static Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder AddAuthenticationStateSerialization (this Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder builder, Action<Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions>? configure = default);
static member AddAuthenticationStateSerialization : Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder * Action<Microsoft.AspNetCore.Components.WebAssembly.Server.AuthenticationStateSerializationOptions> -> Microsoft.Extensions.DependencyInjection.IRazorComponentsBuilder
<Extension()>
Public Function AddAuthenticationStateSerialization (builder As IRazorComponentsBuilder, Optional configure As Action(Of AuthenticationStateSerializationOptions) = Nothing) As IRazorComponentsBuilder
Parameters
- builder
- IRazorComponentsBuilder
- configure
- Action<AuthenticationStateSerializationOptions>
A callback to customize the serialization of the AuthenticationState.
Returns
An IRazorComponentsBuilder that can be used to further customize the configuration.