Skip to content

Commit

Permalink
Update to Microsoft.Identity.Web 3.0.0 (#200)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jmprieur authored Jul 18, 2024
1 parent 17df5e7 commit a24efe5
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -333,3 +333,4 @@ ASALocalRun/
/1-Call-MSGraph/AppCreationScripts-withCert/createdApps.html
/2-Call-OwnApi/AppCreationScripts/createdApps.html
/1-Call-MSGraph/.vscode
/.SharedData
8 changes: 4 additions & 4 deletions 1-Call-MSGraph/daemon-console/daemon-console.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>daemon_console</RootNamespace>
<UserSecretsId>b7366876-bf99-444e-bdb6-af091d4f9556</UserSecretsId>
</PropertyGroup>
Expand All @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="2.19.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 1 addition & 3 deletions 2-Call-OwnApi/TodoList-WebApi/TodoList-WebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.19.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.2" />
<PackageReference Include="Microsoft.Identity.Web" Version="3.0.0" />
</ItemGroup>

</Project>
13 changes: 4 additions & 9 deletions 2-Call-OwnApi/daemon-console/Daemon-Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>daemon_console</RootNamespace>
</PropertyGroup>

Expand All @@ -15,14 +15,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
<PackageReference Include="Microsoft.Identity.Web.DownstreamApi" Version="2.19.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TodoList-WebApi\TodoList-WebApi.csproj" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
<PackageReference Include="Microsoft.Identity.Web.DownstreamApi" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>

<!--This should be passed from the VSTS build-->
<ClientSemVer Condition="'$(ClientSemVer)' == ''">1.0.0-preview</ClientSemVer>
<!--This should be passed from the VSTS build-->
<ClientSemVer Condition="'$(ClientSemVer)' == ''">3.0.0-preview</ClientSemVer>
<!--This will generate AssemblyVersion, AssemblyFileVersion and AssemblyInformationVersion-->
<Version>$(ClientSemVer)</Version>

Expand Down Expand Up @@ -35,15 +36,10 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>


<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web" Version="2.19.1" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.SignedHttpRequest" Version="7.6.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Microsoft.Identity.Web" Version="3.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.SignedHttpRequest" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Collections" Version="4.3.0" />
</ItemGroup>
</Project>
6 changes: 2 additions & 4 deletions 4-Call-OwnApi-Pop/TodoList-WebApi/TodoList-WebApi.csproj
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>TodoList_WebApi</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.19.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.0" />
<PackageReference Include="Microsoft.Identity.Web" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions 4-Call-OwnApi-Pop/daemon-console/Daemon-Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>daemon_console</RootNamespace>
</PropertyGroup>

Expand All @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web.TokenAcquisition" Version="2.19.1" />
<PackageReference Include="Microsoft.Identity.Web.TokenAcquisition" Version="3.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="6.0.1" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="2.19.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClient" Version="3.0.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
<RootNamespace>TodoList_WebApi</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.3" />
<PackageReference Include="Microsoft.Identity.Web" Version="2.19.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.2" />
<PackageReference Include="Microsoft.Identity.Web" Version="3.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>daemon_console</RootNamespace>
</PropertyGroup>

Expand All @@ -15,14 +15,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.0" />
<PackageReference Include="Microsoft.Identity.Web.DownstreamApi" Version="2.19.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="System.Text.Json" Version="6.0.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TodoList-WebApi\TodoList-WebApi.csproj" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.0" />
<PackageReference Include="Microsoft.Identity.Web.DownstreamApi" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit a24efe5

Please sign in to comment.