From ee7c1dfc934904f804d0c7f8a6ef59134c510a0a Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:16:30 -0500 Subject: [PATCH] NIT update for path change (#31994) --- aspnetcore/blazor/security/server/blazor-web-app-with-oidc.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aspnetcore/blazor/security/server/blazor-web-app-with-oidc.md b/aspnetcore/blazor/security/server/blazor-web-app-with-oidc.md index 8028359b25..ae3163a212 100644 --- a/aspnetcore/blazor/security/server/blazor-web-app-with-oidc.md +++ b/aspnetcore/blazor/security/server/blazor-web-app-with-oidc.md @@ -211,7 +211,7 @@ Inspect the sample app for the following features: * Automatic non-interactive token refresh with the help of a custom cookie refresher (`CookieOidcRefresher.cs`). * The `PersistingAuthenticationStateProvider` class (`PersistingAuthenticationStateProvider.cs`) is a server-side that uses to flow the authentication state to the client, which is then fixed for the lifetime of the WebAssembly application. -* An example requests to the Blazor Web App for weather data is handled by a Minimal API endpoint (`/weatherforecast`) in the `Program` file (`Program.cs`). The endpoint requires authorization by calling . For any controllers that you add to the project, add the [`[Authorize]` attribute](xref:Microsoft.AspNetCore.Authorization.AuthorizeAttribute) to the controller or action. +* An example requests to the Blazor Web App for weather data is handled by a Minimal API endpoint (`/weather-forecast`) in the `Program` file (`Program.cs`). The endpoint requires authorization by calling . For any controllers that you add to the project, add the [`[Authorize]` attribute](xref:Microsoft.AspNetCore.Authorization.AuthorizeAttribute) to the controller or action. * The app securely calls a (web) API in the server project for weather data: * When rendering the `Weather` component on the server, the component uses the `ServerWeatherForecaster` on the server to obtain weather data directly (not via a web API call). * When the component is rendered on the client, the component uses the `ClientWeatherForecaster` service implementation, which uses a preconfigured (in the client project's `Program` file) to make a web API call to the server project. A Minimal API endpoint (`/weather-forecast`) defined in the server project's `Program` file obtains the weather data from the `ServerWeatherForecaster` and returns the data to the client. @@ -517,7 +517,7 @@ Configure the project in the +app.MapGet("/weather-forecast", () => { var forecast = Enumerable.Range(1, 5).Select(index => new WeatherForecast