This article describes ASP.NET Core's support for the configuration and management of security in Blazor apps.
|
This article describes ASP.NET Core's support for the configuration and management of security in Blazor apps.
|
The UI options presented to a user (for example, which menu entries are available to a user).
Access rules for areas of the app and components.
Authentication
|
Blazor uses the existing ASP.NET Core authentication mechanisms to establish the user's identity. The exact mechanism depends on how the Blazor app is hosted, Blazor WebAssembly or Blazor Server.
|
Blazor WebAssembly authentication
|
Add the following: A package reference for
Microsoft.AspNetCore.Components.Authorization.
|
add The Microsoft.AspNetCore.Components.Authorization namespace to _Imports.razor file in the Blazor application
|
To handle authentication, use of a built-in or custom AuthenticationStateProvider service is covered in the following sections.
|
For more information on creating apps and configuration, see
Secure ASP.NET Core Blazor WebAssembly
|
No comments:
Post a Comment