Skip to content

Commit 01d1d13

Browse files
authored
1. Sync Microsoft.Identity.Web from the Web App incremental tutorial (#121)
2. Move the sample to ASP.NET Core 3.1
1 parent 39c7503 commit 01d1d13

File tree

14 files changed

+24
-28
lines changed

14 files changed

+24
-28
lines changed

1. Desktop app calls Web API/TodoListClient/TodoListClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</ItemGroup>
110110
<ItemGroup>
111111
<PackageReference Include="Microsoft.Identity.Client">
112-
<Version>4.6.0</Version>
112+
<Version>4.7.1</Version>
113113
</PackageReference>
114114
<PackageReference Include="Newtonsoft.Json">
115115
<Version>11.0.2</Version>

1. Desktop app calls Web API/TodoListService/Properties/launchSettings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"environmentVariables": {
2424
"ASPNETCORE_ENVIRONMENT": "Development"
2525
},
26-
"applicationUrl": "http://localhost:1040/"
26+
"applicationUrl": "https://localhost:44351/",
27+
"sslPort": 44351
2728
}
2829
}
2930
}

1. Desktop app calls Web API/TodoListService/TodoListService.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<UserSecretsId>aspnet-TodoListService-03230DB1-5145-408C-A48B-BE3DAFC56C30</UserSecretsId>
66
<WebProject_DirectoryAccessLevelKey>0</WebProject_DirectoryAccessLevelKey>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" Condition="'$(Configuration)' == 'Debug'" />
1112
</ItemGroup>
1213

1314
<ItemGroup>

2. Web API now calls Microsoft Graph/TodoListClient/TodoListClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</ItemGroup>
110110
<ItemGroup>
111111
<PackageReference Include="Microsoft.Identity.Client">
112-
<Version>4.6.0</Version>
112+
<Version>4.7.1</Version>
113113
</PackageReference>
114114
<PackageReference Include="Newtonsoft.Json">
115115
<Version>11.0.2</Version>

2. Web API now calls Microsoft Graph/TodoListService/TodoListService.csproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<UserSecretsId>aspnet-TodoListService-03230DB1-5145-408C-A48B-BE3DAFC56C30</UserSecretsId>
66
<WebProject_DirectoryAccessLevelKey>0</WebProject_DirectoryAccessLevelKey>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.0" />
11+
<!--<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.1" Condition="'$(Configuration)' == 'Debug'" />-->
12+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" />
1113
</ItemGroup>
1214

1315
<ItemGroup>

3.-Web-api-call-Microsoft-graph-for-personal-accounts/TodoListClient/TodoListClient.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</ItemGroup>
110110
<ItemGroup>
111111
<PackageReference Include="Microsoft.Identity.Client">
112-
<Version>4.6.0</Version>
112+
<Version>4.7.1</Version>
113113
</PackageReference>
114114
<PackageReference Include="Newtonsoft.Json">
115115
<Version>11.0.2</Version>

3.-Web-api-call-Microsoft-graph-for-personal-accounts/TodoListService/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public Startup(IConfiguration configuration)
2424
public void ConfigureServices(IServiceCollection services)
2525
{
2626
services.AddProtectedWebApi(Configuration)
27-
.AddProtectedApiCallsWebApis(Configuration, new string[] { "user.read", "offline_access" })
27+
.AddProtectedApiCallsWebApis(Configuration)
2828
.AddInMemoryTokenCaches();
2929
services.AddControllers();
3030
}

3.-Web-api-call-Microsoft-graph-for-personal-accounts/TodoListService/TodoListService.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<UserSecretsId>aspnet-TodoListService-03230DB1-5145-408C-A48B-BE3DAFC56C30</UserSecretsId>
66
<WebProject_DirectoryAccessLevelKey>0</WebProject_DirectoryAccessLevelKey>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.0.0" />
10+
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.0" />
11+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.0" Condition="'$(Configuration)' == 'Debug'" />
1112
</ItemGroup>
1213

1314
<ItemGroup>

Microsoft.Identity.Web.Test/Microsoft.Identity.Web.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

Microsoft.Identity.Web/ITokenAcquisition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public interface ITokenAcquisition
6767
/// <summary>
6868
/// Used in Web APIs (which therefore cannot have an interaction with the user).
6969
/// Replies to the client through the HttpReponse by sending a 403 (forbidden) and populating wwwAuthenticateHeaders so that
70-
/// the client can trigger an iteraction with the user so that the user consents to more scopes
70+
/// the client can trigger an interaction with the user so that the user consents to more scopes
7171
/// </summary>
7272
/// <param name="scopes">Scopes to consent to</param>
7373
/// <param name="msalSeviceException"><see cref="MsalUiRequiredException"/> triggering the challenge</param>

0 commit comments

Comments
 (0)