Skip to content

Commit 748a42f

Browse files
author
Kalyan Krishna
committed
The web api project upgraded
1 parent 952a196 commit 748a42f

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

4-WebApp-your-API/Client/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void ConfigureServices(IServiceCollection services)
4040
// By default, the claims mapping will map claim names in the old format to accommodate older SAML applications.
4141
// 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role' instead of 'roles'
4242
// This flag ensures that the ClaimsIdentity claims collection will be built from the claims in the token
43-
//JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
43+
// JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
4444

4545
// Token acquisition service based on MSAL.NET
4646
// and chosen token cache implementation

4-WebApp-your-API/README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,6 @@ using Microsoft.Identity.Web.Client.TokenCacheProviders;
337337
338338
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.
339339
340-
- 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.
341-
342-
```CSharp
343-
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
344-
{
345-
app.UseSession();
346-
...
347-
```
348-
349340
### Create the TodoListController.cs file
350341
351342
1. Add a folder named `Models` and then create a new file named `TodoItem.cs`. Copy the contents of the TodoListClient\Models\TodoItem.cs in this file.

4-WebApp-your-API/TodoListService/Startup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ public void ConfigureServices(IServiceCollection services)
5151
// By default, the claims mapping will map claim names in the old format to accommodate older SAML applications.
5252
// 'http://schemas.microsoft.com/ws/2008/06/identity/claims/role' instead of 'roles'
5353
// This flag ensures that the ClaimsIdentity claims collection will be built from the claims in the token
54-
//JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
54+
// JwtSecurityTokenHandler.DefaultMapInboundClaims = false;
5555

56+
// Adds Microsoft Identity platform (AAD v2.0) support to protect this Api
5657
services.AddProtectedWebApi(Configuration);
5758

5859
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);

0 commit comments

Comments
 (0)