Skip to content

Commit b6a46cb

Browse files
author
Kalyan Krishna
committed
fixed formatting issues
1 parent 7d24d64 commit b6a46cb

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

4-WebApp-your-API/README-incremental-instructions.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ Add a reference to the `Microsoft.Identity.Web` library if not already present.
206206
1. Add a section name **TodoList** in the appsettings.json file and add the keys `TodoListScope`, `TodoListBaseAddress`.
207207
1. Update the `configureServices` method in `startup.cs` to add the MSAL library and a token cache.
208208

209-
```CSharp
210-
services.AddAzureAdV2Authentication(Configuration)
211-
.AddMsal(new string[] { Configuration["TodoList:TodoListScope"] })
212-
.AddInMemoryTokenCaches();
213-
```
209+
```CSharp
210+
services.AddAzureAdV2Authentication(Configuration)
211+
.AddMsal(new string[] { Configuration["TodoList:TodoListScope"] })
212+
.AddInMemoryTokenCaches();
213+
```
214214

215215
### Creating the Web API project (TodoListService)
216216

@@ -250,8 +250,9 @@ using Microsoft.Identity.Web.Client.TokenCacheProviders;
250250

251251
```Csharp
252252
services.AddProtectWebApiWithMicrosoftIdentityPlatformV2(Configuration)
253-
.AddProtectedApiCallsWebApis(Configuration, new string[] { Configuration["TodoList:TodoListScope"] })
254-
.AddInMemoryTokenCaches();
253+
.AddProtectedApiCallsWebApis(Configuration,
254+
new string[] { Configuration["TodoList:TodoListScope"] })
255+
AddInMemoryTokenCaches();
255256
```
256257

257258
`AddProtectWebApiWithMicrosoftIdentityPlatformV2` does the following:
@@ -260,15 +261,14 @@ using Microsoft.Identity.Web.Client.TokenCacheProviders;
260261
- sets the audiences to validate
261262
- register an issuer validator that accepts issuers to be in the Microsoft identity platform clouds.
262263

263-
264264
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.
265265

266266
- Then add the following code to inject the ToDoList service implementation in the client
267267

268268
```CSharp
269269
// Add APIs
270270
services.AddTodoListService(Configuration);
271-
```
271+
```
272272

273273
- 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.
274274

4-WebApp-your-API/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ NOTE: Remember, the To-Do list is stored in memory in this `TodoListService` app
246246
by this line:
247247
248248
```CSharp
249-
services.AddAzureAdV2Authentication(Configuration)
250-
.AddMsal(new string[] { Configuration["TodoList:TodoListScope"] })
251-
.AddInMemoryTokenCaches();
249+
services.AddAzureAdV2Authentication(Configuration)
250+
.AddMsal(new string[] { Configuration["TodoList:TodoListScope"] })
251+
.AddInMemoryTokenCaches();
252252
```
253253
254254
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
260260
- Then add the following code to inject the ToDoList service implementation in the client
261261
262262
```CSharp
263-
// Add APIs
264-
services.AddTodoListService(Configuration);
265-
```
263+
// Add APIs
264+
services.AddTodoListService(Configuration);
265+
```
266266
267267
1. Open the `appsettings.json` file and copy the keys from the sample's corresponding file under the `AzureAd` and `TodoList` sections.
268268

@@ -277,9 +277,9 @@ NOTE: Remember, the To-Do list is stored in memory in this `TodoListService` app
277277
1. Update the `configureServices` method in `startup.cs` to add the MSAL library and a token cache.
278278

279279
```CSharp
280-
services.AddAzureAdV2Authentication(Configuration)
281-
.AddMsal(new string[] { Configuration["TodoList:TodoListScope"] })
282-
.AddInMemoryTokenCaches();
280+
services.AddAzureAdV2Authentication(Configuration)
281+
.AddMsal(new string[] { Configuration["TodoList:TodoListScope"] })
282+
.AddInMemoryTokenCaches();
283283
```
284284
285285
### Creating the Web API project (TodoListService)
@@ -324,8 +324,9 @@ using Microsoft.Identity.Web.Client.TokenCacheProviders;
324324
325325
```Csharp
326326
services.AddProtectWebApiWithMicrosoftIdentityPlatformV2(Configuration)
327-
.AddProtectedApiCallsWebApis(Configuration, new string[] { Configuration["TodoList:TodoListScope"] })
328-
.AddInMemoryTokenCaches();
327+
.AddProtectedApiCallsWebApis(Configuration,
328+
new string[] { Configuration["TodoList:TodoListScope"] })
329+
AddInMemoryTokenCaches();
329330
```
330331
331332
`AddProtectWebApiWithMicrosoftIdentityPlatformV2` does the following:

0 commit comments

Comments
 (0)