From a24efe504ce4b94e8118446a577aa702a3ab5346 Mon Sep 17 00:00:00 2001 From: Jean-Marc Prieur Date: Thu, 18 Jul 2024 08:33:41 -0700 Subject: [PATCH] Update to Microsoft.Identity.Web 3.0.0 (#200) * Update to Microsoft.Identity.Web 3.0.0 * Update the samples to net8.0 and Microsoft.Extensions 8.0 Remove un-used package references and project references. Addresses CVEs --- .gitignore | 1 + .../daemon-console/daemon-console.csproj | 8 ++++---- .../Controllers/TodoListController.cs | 7 +------ .../TodoList-WebApi/TodoList-WebApi.csproj | 4 +--- .../daemon-console/Daemon-Console.csproj | 13 ++++--------- .../Microsoft.Identity.Web.Future.csproj | 16 ++++++---------- .../TodoList-WebApi/TodoList-WebApi.csproj | 6 ++---- .../daemon-console/Daemon-Console.csproj | 4 ++-- .../daemon-console/Daemon-Console.csproj | 4 ++-- .../Controllers/TodoListController.cs | 1 - .../TodoList-WebApi/TodoList-WebApi.csproj | 6 ++---- .../daemon-console/Daemon-Console.csproj | 13 ++++--------- 12 files changed, 29 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index a5aa34e..c4f2009 100644 --- a/.gitignore +++ b/.gitignore @@ -333,3 +333,4 @@ ASALocalRun/ /1-Call-MSGraph/AppCreationScripts-withCert/createdApps.html /2-Call-OwnApi/AppCreationScripts/createdApps.html /1-Call-MSGraph/.vscode +/.SharedData diff --git a/1-Call-MSGraph/daemon-console/daemon-console.csproj b/1-Call-MSGraph/daemon-console/daemon-console.csproj index 062b561..b0bad84 100644 --- a/1-Call-MSGraph/daemon-console/daemon-console.csproj +++ b/1-Call-MSGraph/daemon-console/daemon-console.csproj @@ -1,8 +1,8 @@ - + Exe - net7.0 + net8.0 daemon_console b7366876-bf99-444e-bdb6-af091d4f9556 @@ -12,8 +12,8 @@ - - + + diff --git a/2-Call-OwnApi/TodoList-WebApi/Controllers/TodoListController.cs b/2-Call-OwnApi/TodoList-WebApi/Controllers/TodoListController.cs index c7c63af..9de9f34 100644 --- a/2-Call-OwnApi/TodoList-WebApi/Controllers/TodoListController.cs +++ b/2-Call-OwnApi/TodoList-WebApi/Controllers/TodoListController.cs @@ -1,15 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Identity.Web.Resource; -using Newtonsoft.Json; +using System.Collections.Generic; using TodoList_WebApi.Models; namespace TodoList_WebApi.Controllers diff --git a/2-Call-OwnApi/TodoList-WebApi/TodoList-WebApi.csproj b/2-Call-OwnApi/TodoList-WebApi/TodoList-WebApi.csproj index 3329434..515ae13 100644 --- a/2-Call-OwnApi/TodoList-WebApi/TodoList-WebApi.csproj +++ b/2-Call-OwnApi/TodoList-WebApi/TodoList-WebApi.csproj @@ -7,9 +7,7 @@ - - - + diff --git a/2-Call-OwnApi/daemon-console/Daemon-Console.csproj b/2-Call-OwnApi/daemon-console/Daemon-Console.csproj index 238130e..dffce2d 100644 --- a/2-Call-OwnApi/daemon-console/Daemon-Console.csproj +++ b/2-Call-OwnApi/daemon-console/Daemon-Console.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 daemon_console @@ -15,14 +15,9 @@ - - - - - - - - + + + diff --git a/4-Call-OwnApi-Pop/Microsoft.Identity.Web.Future/Microsoft.Identity.Web.Future.csproj b/4-Call-OwnApi-Pop/Microsoft.Identity.Web.Future/Microsoft.Identity.Web.Future.csproj index 5d6c2e7..2bb5b2b 100644 --- a/4-Call-OwnApi-Pop/Microsoft.Identity.Web.Future/Microsoft.Identity.Web.Future.csproj +++ b/4-Call-OwnApi-Pop/Microsoft.Identity.Web.Future/Microsoft.Identity.Web.Future.csproj @@ -1,8 +1,9 @@ + net8.0 - - 1.0.0-preview + + 3.0.0-preview $(ClientSemVer) @@ -35,15 +36,10 @@ - - - net6.0 - - - - - + + + diff --git a/4-Call-OwnApi-Pop/TodoList-WebApi/TodoList-WebApi.csproj b/4-Call-OwnApi-Pop/TodoList-WebApi/TodoList-WebApi.csproj index fe57b40..b037d0d 100644 --- a/4-Call-OwnApi-Pop/TodoList-WebApi/TodoList-WebApi.csproj +++ b/4-Call-OwnApi-Pop/TodoList-WebApi/TodoList-WebApi.csproj @@ -1,15 +1,13 @@ - net6.0 + net8.0 InProcess TodoList_WebApi - - - + diff --git a/4-Call-OwnApi-Pop/daemon-console/Daemon-Console.csproj b/4-Call-OwnApi-Pop/daemon-console/Daemon-Console.csproj index f625e51..ad7a688 100644 --- a/4-Call-OwnApi-Pop/daemon-console/Daemon-Console.csproj +++ b/4-Call-OwnApi-Pop/daemon-console/Daemon-Console.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 daemon_console @@ -11,7 +11,7 @@ - + diff --git a/5-Call-MSGraph-ManagedIdentity/daemon-console/Daemon-Console.csproj b/5-Call-MSGraph-ManagedIdentity/daemon-console/Daemon-Console.csproj index 57a4edd..4a8796c 100644 --- a/5-Call-MSGraph-ManagedIdentity/daemon-console/Daemon-Console.csproj +++ b/5-Call-MSGraph-ManagedIdentity/daemon-console/Daemon-Console.csproj @@ -11,7 +11,7 @@ - - + + diff --git a/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/Controllers/TodoListController.cs b/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/Controllers/TodoListController.cs index 94cd497..d02642a 100644 --- a/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/Controllers/TodoListController.cs +++ b/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/Controllers/TodoListController.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.Identity.Web.Resource; -using Newtonsoft.Json; using TodoList_WebApi.Models; namespace TodoList_WebApi.Controllers diff --git a/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/TodoList-WebApi.csproj b/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/TodoList-WebApi.csproj index 317ca8a..8484b38 100644 --- a/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/TodoList-WebApi.csproj +++ b/6-Call-OwnApi - ManagedIdentity/TodoList-WebApi/TodoList-WebApi.csproj @@ -1,15 +1,13 @@ - net7.0 + net8.0 InProcess TodoList_WebApi - - - + diff --git a/6-Call-OwnApi - ManagedIdentity/daemon-console/Daemon-Console.csproj b/6-Call-OwnApi - ManagedIdentity/daemon-console/Daemon-Console.csproj index 39d6c56..e7c5dd7 100644 --- a/6-Call-OwnApi - ManagedIdentity/daemon-console/Daemon-Console.csproj +++ b/6-Call-OwnApi - ManagedIdentity/daemon-console/Daemon-Console.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 daemon_console @@ -15,14 +15,9 @@ - - - - - - - - + + +