diff --git a/aspnetcore/blazor/security/webassembly/additional-scenarios.md b/aspnetcore/blazor/security/webassembly/additional-scenarios.md index 969f1907da..cf28846c69 100644 --- a/aspnetcore/blazor/security/webassembly/additional-scenarios.md +++ b/aspnetcore/blazor/security/webassembly/additional-scenarios.md @@ -29,7 +29,9 @@ In the following example: * is the used to process access tokens. Access tokens are only added when the request URI is within the app's base URI. * creates and configures an instance for outgoing requests using the configuration that corresponds to the named (`WebAPI`). -In the following example, is an extension in . +In the following example, is an extension in . Add the package to an app that doesn't already reference it. + +[!INCLUDE[](~/includes/package-reference.md)] ```csharp using System.Net.Http; @@ -268,7 +270,9 @@ In the preceding code, the scopes `example.read` and `example.write` are generic In `Program.cs`, `CustomAuthorizationMessageHandler` is registered as a transient service and is configured as the for outgoing instances made by a named . -In the following example, is an extension in . +In the following example, is an extension in . Add the package to an app that doesn't already reference it. + +[!INCLUDE[](~/includes/package-reference.md)] ```csharp builder.Services.AddTransient(); @@ -424,7 +428,9 @@ public class WeatherForecastClient In the preceding example, the `WeatherForecast` type is a static class that holds weather forecast data. The placeholder `{ASSEMBLY NAME}` is the app's assembly name (for example, `using static BlazorSample.Data;`). -In the following example, is an extension in . +In the following example, is an extension in . Add the package to an app that doesn't already reference it. + +[!INCLUDE[](~/includes/package-reference.md)] In `Program.cs`: @@ -458,7 +464,9 @@ protected override async Task OnInitializedAsync() The handler can be further configured with for outbound HTTP requests. -In the following example, is an extension in . +In the following example, is an extension in . Add the package to an app that doesn't already reference it. + +[!INCLUDE[](~/includes/package-reference.md)] In `Program.cs`: @@ -482,7 +490,9 @@ For a hosted Blazor solution based on the [Blazor WebAssembly project template]( An app that ordinarily uses a secure default can also make unauthenticated or unauthorized web API requests by configuring a named . -In the following example, is an extension in . +In the following example, is an extension in . Add the package to an app that doesn't already reference it. + +[!INCLUDE[](~/includes/package-reference.md)] In `Program.cs`: