You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`AddProtectWebApiWithMicrosoftIdentityPlatformV2` does the following:
@@ -260,15 +261,14 @@ using Microsoft.Identity.Web.Client.TokenCacheProviders;
260
261
- sets the audiences to validate
261
262
- register an issuer validator that accepts issuers to be in the Microsoft identity platform clouds.
262
263
263
-
264
264
The implementations of these classes are in the Microsoft.Identity.Web library (and folder), and they are designed to be reusable in your applications (Web apps and Web apis). You are encouraged to browse the code in the library to understand the changes in detail.
265
265
266
266
- Then add the following code to inject the ToDoList service implementation in the client
267
267
268
268
```CSharp
269
269
// Add APIs
270
270
services.AddTodoListService(Configuration);
271
-
```
271
+
```
272
272
273
273
- At the beginning of the `Configure` method, insert `app.UseSession()`. This code ensures that the session exists for the session-based token cache to work properly. You can skip this if you do not plan to use the session based token cache.
This enables your application to use the Microsoft identity platform (formerly Azure AD v2.0) endpoint. This endpoint is capable of signing-in users both with their Work and School and Microsoft Personal accounts.
@@ -260,9 +260,9 @@ NOTE: Remember, the To-Do list is stored in memory in this `TodoListService` app
260
260
- Then add the following code to inject the ToDoList service implementation in the client
261
261
262
262
```CSharp
263
-
// Add APIs
264
-
services.AddTodoListService(Configuration);
265
-
```
263
+
// Add APIs
264
+
services.AddTodoListService(Configuration);
265
+
```
266
266
267
267
1. Open the `appsettings.json` file and copy the keys from the sample's corresponding file under the `AzureAd` and `TodoList` sections.
268
268
@@ -277,9 +277,9 @@ NOTE: Remember, the To-Do list is stored in memory in this `TodoListService` app
277
277
1. Update the `configureServices` method in`startup.cs` to add the MSAL library and a token cache.
0 commit comments