Skip to content

Commit 92e74a7

Browse files
author
Tom-Einar Sørensen
committed
Update core version to 3.1
1 parent f493f49 commit 92e74a7

File tree

9 files changed

+23
-41
lines changed

9 files changed

+23
-41
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vs
2+
.idea
23
Source/DemoWebApp/bin/
34
Source/DemoWebApp/obj/
45
Source/Saml2.Authentication.Core/obj/

Source/DemoWebApp/Controllers/AccountController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
using DemoWebApp.Models;
1414
using DemoWebApp.Models.AccountViewModels;
1515
using DemoWebApp.Services;
16-
using Microsoft.AspNetCore.Hosting.Internal;
1716
using Saml2.Authentication.Core.Authentication;
1817

1918
namespace DemoWebApp.Controllers

Source/DemoWebApp/Controllers/HomeController.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Diagnostics;
4-
using System.Linq;
5-
using System.Threading.Tasks;
1+
using DemoWebApp.Models;
62
using Microsoft.AspNetCore.Mvc;
7-
using DemoWebApp.Models;
3+
using System.Diagnostics;
84

95
namespace DemoWebApp.Controllers
106
{

Source/DemoWebApp/DemoWebApp.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<UserSecretsId>aspnet-DemoWebApp-C260B8F3-E5A3-4A4D-B57A-771F079933AA</UserSecretsId>
66
</PropertyGroup>
77

8-
98
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore" Version="2.2.0" />
11-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="2.2.0" />
12-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="2.2.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Hosting" Version="2.2.0" />
14-
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
15-
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.2.0" />
16-
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="2.2.0" />
17-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
18-
<PackageReference Include="Microsoft.AspNetCore.Session" Version="2.2.0" />
19-
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
20-
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.2.1" />
21-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.1" PrivateAssets="All" />
9+
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.2" />
10+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
11+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.2" />
12+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.2" PrivateAssets="All" />
2213
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.1" PrivateAssets="All" />
23-
<PackageReference Include="Saml2.Authentication.Core" Version="1.0.0" />
2414
</ItemGroup>
2515

2616
<ItemGroup>

Source/DemoWebApp/Startup.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
namespace DemoWebApp
1+
using Microsoft.Extensions.Hosting;
2+
3+
namespace DemoWebApp
24
{
35
using DemoWebApp.Data;
46
using DemoWebApp.Models;
@@ -57,7 +59,7 @@ public void ConfigureServices(IServiceCollection services)
5759
}
5860

5961
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
60-
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
62+
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
6163
{
6264
using (var serviceScope = app.ApplicationServices.GetService<IServiceScopeFactory>().CreateScope())
6365
{
@@ -75,14 +77,11 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
7577
}
7678

7779
app.UseStaticFiles();
78-
80+
app.UseRouting();
7981
app.UseAuthentication();
80-
81-
app.UseMvc(routes =>
82+
app.UseEndpoints(routes =>
8283
{
83-
routes.MapRoute(
84-
name: "default",
85-
template: "{controller=Home}/{action=Index}/{id?}");
84+
routes.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
8685
});
8786
}
8887
}

Source/DemoWebApp/Views/Account/Login.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@using System.Collections.Generic
22
@using System.Linq
33
@using Microsoft.AspNetCore.Http
4-
@using Microsoft.AspNetCore.Http.Authentication
4+
@*@using Microsoft.AspNetCore.Http.Authentication*@
55
@model LoginViewModel
66
@inject SignInManager<ApplicationUser> SignInManager
77

Source/Saml2.Authentication.Core/Authentication/Saml2Extensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ public static AuthenticationBuilder AddSaml(this AuthenticationBuilder builder,
2424
return builder.AddScheme<Saml2Options, Saml2Handler>(authenticationScheme, displayName, configureOptions);
2525
}
2626
}
27-
}
27+
}

Source/Saml2.Authentication.Core/Configuration/Saml2Options.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
{
33
using Authentication;
44
using Microsoft.AspNetCore.Authentication;
5-
using Microsoft.AspNetCore.Authentication.Internal;
65
using Microsoft.AspNetCore.DataProtection;
76
using Microsoft.AspNetCore.Http;
87
using System;

Source/Saml2.Authentication.Core/Saml2.Authentication.Core.csproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
32
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.2</TargetFramework>
3+
<TargetFramework>netcoreapp3.1</TargetFramework>
54
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
65
<IsPackable>true</IsPackable>
76
<IncludeSymbols>true</IncludeSymbols>
@@ -19,12 +18,11 @@
1918
</PropertyGroup>
2019

2120
<ItemGroup>
22-
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.1.2" />
23-
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.1.2" />
24-
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
25-
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.5.0" />
26-
<PackageReference Include="System.ServiceModel.Http" Version="4.5.3" />
27-
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.3" />
21+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2826
</ItemGroup>
2927

3028
</Project>

0 commit comments

Comments
 (0)