Skip to content

Commit

Permalink
Merge pull request #4 from DuendeSoftware/features/net5
Browse files Browse the repository at this point in the history
.NET 5 Targeting
  • Loading branch information
leastprivilege authored Oct 23, 2020
2 parents dc20fde + c473821 commit a981c3d
Show file tree
Hide file tree
Showing 31 changed files with 188 additions and 278 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ jobs:
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@af513c7a016048ae468971c52ed77d9562c7c819

- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.100-rc.2.20479.15'
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- run: dotnet --info

- if: contains(matrix.runs-on, 'macOS') || contains(matrix.runs-on, 'ubuntu')
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "3.1.402"
"version": "5.0.100-rc.2.20479.15"
}
}
6 changes: 1 addition & 5 deletions src/AspNetIdentity/host/Host.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="System.Security.Principal.Windows" />

<ProjectReference Include="..\src\Duende.IdentityServer.AspNetIdentity.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageId>Duende.IdentityServer.AspNetIdentity</PackageId>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>

<Description>ASP.NET Core Identity Integration for Duende IdentityServer</Description>
<AssemblyName>Duende.IdentityServer.AspNetIdentity</AssemblyName>
Expand Down
19 changes: 14 additions & 5 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
<Project>

<PropertyGroup>
<IdentityServerVersion>5.0.0-*</IdentityServerVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'netstandard2.0'">
<FrameworkVersion>3.1.0</FrameworkVersion>
<ExtensionsVersion>3.1.0</ExtensionsVersion>
<EntityFrameworkVersion>3.1.0</EntityFrameworkVersion>

<IdentityServerVersion>5.0.0-*</IdentityServerVersion>
<WilsonVersion>5.6.0</WilsonVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0'">
<FrameworkVersion>5.0.0-rc.2.*</FrameworkVersion>
<ExtensionsVersion>5.0.0-rc.2.*</ExtensionsVersion>
<EntityFrameworkVersion>5.0.0-rc.2.*</EntityFrameworkVersion>
<WilsonVersion>6.8.0</WilsonVersion>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -40,9 +50,8 @@

<!--misc -->
<PackageReference Update="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Update="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="5.6.0" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="[5.6.0,6.0)" />
<PackageReference Update="System.Security.Principal.Windows" Version="4.7.0" />
<PackageReference Update="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(WilsonVersion)" />
<PackageReference Update="System.IdentityModel.Tokens.Jwt" Version="$(WilsonVersion)" />
<PackageReference Update="AutoMapper" Version="[10.0.0,11.0)" />

<!--microsoft asp.net core -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Duende.IdentityServer.EntityFramework.Storage</PackageId>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>

<Description>EntityFramework persistence layer for Duende IdentityServer</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 1 addition & 4 deletions src/EntityFramework/host/Host.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
</ItemGroup>

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

<PropertyGroup>
<PackageId>Duende.IdentityServer.EntityFramework</PackageId>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>

<Description>EntityFramework persistence layer for Duende IdentityServer</Description>
<AssemblyName>Duende.IdentityServer.EntityFramework</AssemblyName>
Expand Down
3 changes: 1 addition & 2 deletions src/IdentityServer/host/Host.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
</PropertyGroup>

Expand All @@ -20,7 +20,6 @@

<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" PrivateAssets="All" />
<PackageReference Include="System.Security.Principal.Windows" />

<ProjectReference Include="..\src\Duende.IdentityServer.csproj" />
</ItemGroup>
Expand Down
9 changes: 0 additions & 9 deletions src/IdentityServer/host/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
},
"Host (proxy)": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "https://identityserver.local",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using Duende.IdentityServer.Models;
using Duende.IdentityServer.Stores;
using Microsoft.IdentityModel.Tokens;
using Newtonsoft.Json;
using System;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -185,7 +184,7 @@ public static IIdentityServerBuilder AddDeveloperSigningCredential(

if (persistKey)
{
File.WriteAllText(filename, JsonConvert.SerializeObject(jwk));
File.WriteAllText(filename, System.Text.Json.JsonSerializer.Serialize(jwk));
}

return builder.AddSigningCredential(key, signingAlgorithm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.Extensions.Logging;
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;

namespace Microsoft.AspNetCore.Builder
Expand Down Expand Up @@ -54,7 +55,7 @@ internal static void Validate(this IApplicationBuilder app)
if (loggerFactory == null) throw new ArgumentNullException(nameof(loggerFactory));

var logger = loggerFactory.CreateLogger("Duende.IdentityServer.Startup");
logger.LogInformation("Starting Duende IdentityServer version {version}", typeof(Duende.IdentityServer.Hosting.IdentityServerMiddleware).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
logger.LogInformation("Starting Duende IdentityServer version {version} ({netversion})", typeof(Duende.IdentityServer.Hosting.IdentityServerMiddleware).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion, RuntimeInformation.FrameworkDescription);

var scopeFactory = app.ApplicationServices.GetService<IServiceScopeFactory>();

Expand Down
5 changes: 2 additions & 3 deletions src/IdentityServer/src/Duende.IdentityServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<PackageId>Duende.IdentityServer</PackageId>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<Description>OpenID Connect and OAuth 2.0 Framework for ASP.NET Core</Description>

<AssemblyName>Duende.IdentityServer</AssemblyName>
Expand All @@ -16,8 +16,7 @@
<ItemGroup>
<PackageReference Include="Duende.IdentityServer.Storage" />
<PackageReference Include="IdentityModel" />

<PackageReference Include="Newtonsoft.Json" />

<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />

<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
Expand Down
Loading

0 comments on commit a981c3d

Please sign in to comment.