Skip to content

Commit

Permalink
Merge pull request #24 from JoeShook/main
Browse files Browse the repository at this point in the history
IdentityServer v7
  • Loading branch information
JoeShook authored Feb 2, 2024
2 parents ada14f2 + 8a2a6da commit 990434f
Show file tree
Hide file tree
Showing 119 changed files with 2,131 additions and 458 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.13",
"version": "8.0.1",
"commands": [
"dotnet-ef"
]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
source-url: ${{ env.REPOSITORY_URL }}
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Generate PKI
run: dotnet test -c Release _tests/Udap.PKI.Generator/Udap.PKI.Generator.csproj
- name: Build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
7.0.x
8.0.x
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Set VERSION variable from tag
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
with:
dotnet-version: |
6.0.x
7.0.x
7.0.x
8.0.x
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Set VERSION variable from tag
Expand Down
44 changes: 22 additions & 22 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@
</PropertyGroup>
<ItemGroup>
<!-- https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges -->
<PackageVersion Include="Duende.IdentityServer.Storage" Version="6.3.5" />
<PackageVersion Include="Duende.IdentityServer.Storage" Version="6.3.7" />
<PackageVersion Include="Google.Cloud.SecretManager.V1" Version="2.1.0" />
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.6.0" />
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.7.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="[6.0.23,7.0.12]" />
<PackageVersion Include="AspNetCoreRateLimit" Version="5.0.0" />
<PackageVersion Include="Hl7.Fhir.Specification.R4B" Version="5.3.0" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="[6.0.23,7.0.13]" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageVersion Include="MSTest.TestFramework" Version="3.1.1" />
<PackageVersion Include="IdentityModel" Version="6.2.0" />
<PackageVersion Include="System.Text.Json" Version="[6.0.7,7.0.3]" />
<PackageVersion Include="AutoMapper" Version="12.0.1" />
<PackageVersion Include="Duende.IdentityServer" Version="6.3.5" />
<PackageVersion Include="Duende.IdentityServer.AspNetIdentity" Version="6.3.5" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework.Storage" Version="6.3.5" />
<PackageVersion Include="Duende.IdentityServer" Version="7.0.0" />
<PackageVersion Include="Duende.IdentityServer.AspNetIdentity" Version="7.0.0" />
<PackageVersion Include="Duende.IdentityServer.EntityFramework.Storage" Version="7.0.0" />
<PackageVersion Include="IdentityModel.AspNetCore.OAuth2Introspection" Version="6.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="[7.0.13,8.0.1]" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[7.0.13,8.0.0]" />
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.13" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="[7.0.14,8.0.1]" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[6.0.0,7.0.0]" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="[6.0.0,7.0.1]" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.0.3" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.3.0" />
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="[6.10.0,6.30.0]" />
<PackageVersion Include="OpenTelemetry" Version="1.6.0" />
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.6.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.6.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.6.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc9.14" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc9.14" />
<PackageVersion Include="OpenTelemetry" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.7.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.0.0-rc9.14" />
<PackageVersion Include="Serilog.AspNetCore" Version="[6.1.0,7.0.0]" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="[3.1.0,7.0.0]" />
<PackageVersion Include="Portable.BouncyCastle" Version="1.9.0" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="7.3.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Udap.Client/Udap.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion Udap.Common/Udap.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- https://docs.microsoft.com/en-us/dotnet/standard/frameworks -->
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
2 changes: 1 addition & 1 deletion Udap.Metadata.Server/Udap.Metadata.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RepositoryType>git</RepositoryType>
Expand Down
18 changes: 1 addition & 17 deletions Udap.Model/Udap.Model.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

Expand Down Expand Up @@ -45,20 +45,4 @@
</ItemGroup>


<ItemGroup>
<Reference Include="Duende.IdentityServer.Storage">
<HintPath>..\..\..\..\DuendeSoftware\IdentityServer\src\Storage\bin\Debug\net7.0\Duende.IdentityServer.Storage.dll</HintPath>
</Reference>
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Duende.IdentityServer.Storage" />
</ItemGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Duende.IdentityServer.Storage" />
</ItemGroup>

</Project>
27 changes: 0 additions & 27 deletions Udap.Server/Infrastructure/Clock/LegacyClock.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,13 @@ public static class UdapConfigurationServiceCollectionExtensions
/// Remember to supply a IUdapClientRegistrationStore to access the certificate anchors
/// and storage process for new client registrations.
/// </summary>
/// <param name="services">IServiceCollection</param>
/// <param name="builder">IUdapServiceBuilder</param>
/// <returns></returns>
public static IUdapServiceBuilder AddUdapServerConfiguration(this IUdapServiceBuilder builder)
{
builder.Services.TryAddSingleton<IScopeExpander, DefaultScopeExpander>();
builder.Services.AddScoped<UdapDynamicClientRegistrationEndpoint>();
#if NET8_0_OR_GREATER
services.TryAddTransient<IClock, DefaultClock>();
#else
builder.Services.TryAddTransient<IClock, LegacyClock>();
#endif
builder.Services.TryAddTransient<IClock, DefaultClock>();
builder.Services.TryAddTransient<IUdapDynamicClientRegistrationValidator, UdapDynamicClientRegistrationValidator>();
builder.Services.TryAddSingleton<TrustChainValidator>();

Expand Down
2 changes: 1 addition & 1 deletion Udap.Server/ResponseHandling/UdapTokenResponseGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class UdapTokenResponseGenerator : TokenResponseGenerator
/// <param name="logger">The logger.</param>
public UdapTokenResponseGenerator(
IProfileService profile,
ISystemClock clock,
IClock clock,
ITokenService tokenService,
IRefreshTokenService refreshTokenService,
IScopeParser scopeParser,
Expand Down
2 changes: 1 addition & 1 deletion Udap.Server/Stores/UdapClientConfigurationStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public UdapClientConfigurationStore(IUdapDbContext dbContext)
var entity = await _dbContext.Clients
.SingleOrDefaultAsync(c => c.ClientId == client.ClientId, token);

return entity.ToModel();
return entity?.ToModel();
}

public async Task<IEnumerable<Anchor>> GetAnchors(CancellationToken token = default)
Expand Down
2 changes: 1 addition & 1 deletion Udap.Server/Stores/UdapClientRegistrationStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public UdapClientRegistrationStore(IUdapDbAdminContext dbContext, ILogger<UdapCl
var entity = await _dbContext.Clients
.SingleOrDefaultAsync(c => c.ClientId == client.ClientId, token);

return entity.ToModel();
return entity?.ToModel();
}


Expand Down
2 changes: 1 addition & 1 deletion Udap.Server/Udap.Server.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AssemblyName>Udap.Server</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion Udap.Util/Udap.Util.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

Expand Down
Loading

0 comments on commit 990434f

Please sign in to comment.