Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
WebAssemblyRazorComponentsBuilderExtensions.AddAuthenticationStateSerialization Method
Definition
- Namespace:
- Microsoft.Extensions.DependencyInjection
- Assembly:
- Microsoft.AspNetCore.Components.WebAssembly.Server.dll
- Package:
- Microsoft.AspNetCore.Components.WebAssembly.Server v10.0.0
- Package:
- Microsoft.AspNetCore.Components.WebAssembly.Server v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Components.WebAssembly.Server v9.0.8
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.
Applies to
Feedback
Was this page helpful?
