Browse Source

Update IdentityServer4 -> Duende (#33590)

Hao Kung 4 years ago
parent
commit
c754959e71
45 changed files with 498 additions and 97 deletions
  1. 5 5
      eng/Dependencies.props
  2. 5 5
      eng/Versions.props
  3. 1 1
      src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/ApplicationDbContext.cs
  4. 38 2
      src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/Migrations/20200324213904_Initial.Designer.cs
  5. 21 0
      src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/Migrations/20200324213904_Initial.cs
  6. 41 2
      src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/Migrations/ApplicationDbContextModelSnapshot.cs
  7. 2 0
      src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Wasm.Authentication.Server.csproj
  8. 3 1
      src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj
  9. 1 1
      src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/ApplicationDbContext.cs
  10. 90 3
      src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/Migrations/20180919224505_InitialMigration.Designer.cs
  11. 35 0
      src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/Migrations/20180919224505_InitialMigration.cs
  12. 119 8
      src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/Migrations/ApplicationDbContextModelSnapshot.cs
  13. 0 0
      src/Identity/ApiAuthorization.IdentityServer/src/ApiAuthorizationDbContext.cs
  14. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Authentication/AuthenticationBuilderExtensions.cs
  15. 2 2
      src/Identity/ApiAuthorization.IdentityServer/src/Authentication/IdentityServerJwtBearerOptionsConfiguration.cs
  16. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ApplicationProfilesPropertyNames.cs
  17. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ApplicationProfilesPropertyValues.cs
  18. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/AspNetConventionsConfigureOptions.cs
  19. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureApiResources.cs
  20. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureApiScopes.cs
  21. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureClientScopes.cs
  22. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureClients.cs
  23. 5 5
      src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureIdentityResources.cs
  24. 9 4
      src/Identity/ApiAuthorization.IdentityServer/src/Data/ApiAuthorizationDbContext.cs
  25. 6 6
      src/Identity/ApiAuthorization.IdentityServer/src/Extensions/AutoRedirectEndSessionEndpoint.cs
  26. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Extensions/DefaultClientRequestParametersProvider.cs
  27. 2 2
      src/Identity/ApiAuthorization.IdentityServer/src/Extensions/RelativeRedirectUriValidator.cs
  28. 6 6
      src/Identity/ApiAuthorization.IdentityServer/src/IdentityServerBuilderConfigurationExtensions.cs
  29. 14 6
      src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj
  30. 2 2
      src/Identity/ApiAuthorization.IdentityServer/src/Options/ApiResourceBuilder.cs
  31. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Options/ApiResourceCollection.cs
  32. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Options/ApiScopeCollection.cs
  33. 2 2
      src/Identity/ApiAuthorization.IdentityServer/src/Options/ClientBuilder.cs
  34. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Options/ClientCollection.cs
  35. 5 5
      src/Identity/ApiAuthorization.IdentityServer/src/Options/IdentityResourceBuilder.cs
  36. 1 1
      src/Identity/ApiAuthorization.IdentityServer/src/Options/IdentityResourceCollection.cs
  37. 51 0
      src/Identity/ApiAuthorization.IdentityServer/src/PublicAPI.Unshipped.txt
  38. 2 2
      src/Identity/ApiAuthorization.IdentityServer/test/Authentication/LocalApiJwtBearerConfigurationTest.cs
  39. 1 1
      src/Identity/ApiAuthorization.IdentityServer/test/Configuration/AspNetConventionsConfigureOptionsTests.cs
  40. 2 2
      src/Identity/ApiAuthorization.IdentityServer/test/Configuration/ConfigureClientsTests.cs
  41. 5 5
      src/Identity/ApiAuthorization.IdentityServer/test/Extensions/AutoRedirectEndSessionEndpointTests.cs
  42. 1 1
      src/Identity/ApiAuthorization.IdentityServer/test/Extensions/DefaultClientRequestParametersProviderTests.cs
  43. 5 3
      src/Identity/ApiAuthorization.IdentityServer/test/Extensions/IdentityServerBuilderConfigurationExtensionsTests.cs
  44. 1 1
      src/Identity/ApiAuthorization.IdentityServer/test/Extensions/RelativeRedirectUriValidatorTests.cs
  45. 3 1
      src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj

+ 5 - 5
eng/Dependencies.props

@@ -160,17 +160,17 @@ and are generated based on the last package release.
     <LatestPackageReference Include="AngleSharp" />
     <LatestPackageReference Include="BenchmarkDotNet" />
     <LatestPackageReference Include="CommandLineParser" />
+    <LatestPackageReference Include="Duende.IdentityServer" />
+    <LatestPackageReference Include="Duende.IdentityServer.AspNetIdentity" />
+    <LatestPackageReference Include="Duende.IdentityServer.EntityFramework" />
+    <LatestPackageReference Include="Duende.IdentityServer.EntityFramework.Storage" />
+    <LatestPackageReference Include="Duende.IdentityServer.Storage" />
     <LatestPackageReference Include="FSharp.Core" />
     <LatestPackageReference Include="Google.Protobuf" />
     <LatestPackageReference Include="Grpc.AspNetCore" />
     <LatestPackageReference Include="Grpc.Auth" />
     <LatestPackageReference Include="Grpc.Net.Client" />
     <LatestPackageReference Include="Grpc.Tools" />
-    <LatestPackageReference Include="IdentityServer4" />
-    <LatestPackageReference Include="IdentityServer4.AspNetIdentity" />
-    <LatestPackageReference Include="IdentityServer4.EntityFramework" />
-    <LatestPackageReference Include="IdentityServer4.EntityFramework.Storage" />
-    <LatestPackageReference Include="IdentityServer4.Storage" />
     <LatestPackageReference Include="Libuv" />
     <LatestPackageReference Include="MessagePack" />
     <LatestPackageReference Include="MessagePackAnalyzer" />

+ 5 - 5
eng/Versions.props

@@ -229,11 +229,11 @@
     <GrpcAuthVersion>2.32.0</GrpcAuthVersion>
     <GrpcNetClientVersion>2.32.0</GrpcNetClientVersion>
     <GrpcToolsVersion>2.32.0</GrpcToolsVersion>
-    <IdentityServer4AspNetIdentityVersion>4.1.0</IdentityServer4AspNetIdentityVersion>
-    <IdentityServer4EntityFrameworkVersion>4.1.0</IdentityServer4EntityFrameworkVersion>
-    <IdentityServer4Version>4.1.0</IdentityServer4Version>
-    <IdentityServer4StorageVersion>4.1.0</IdentityServer4StorageVersion>
-    <IdentityServer4EntityFrameworkStorageVersion>4.1.0</IdentityServer4EntityFrameworkStorageVersion>
+    <DuendeIdentityServerAspNetIdentityVersion>5.2.0</DuendeIdentityServerAspNetIdentityVersion>
+    <DuendeIdentityServerEntityFrameworkVersion>5.2.0</DuendeIdentityServerEntityFrameworkVersion>
+    <DuendeIdentityServerVersion>5.2.0</DuendeIdentityServerVersion>
+    <DuendeIdentityServerStorageVersion>5.2.0</DuendeIdentityServerStorageVersion>
+    <DuendeIdentityServerEntityFrameworkStorageVersion>5.2.0</DuendeIdentityServerEntityFrameworkStorageVersion>
     <MessagePackVersion>2.1.90</MessagePackVersion>
     <MicrosoftIdentityWebVersion>1.1.0</MicrosoftIdentityWebVersion>
     <MicrosoftIdentityWebMicrosoftGraphVersion>1.1.0</MicrosoftIdentityWebMicrosoftGraphVersion>

+ 1 - 1
src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/ApplicationDbContext.cs

@@ -1,5 +1,5 @@
 using Wasm.Authentication.Server.Models;
-using IdentityServer4.EntityFramework.Options;
+using Duende.IdentityServer.EntityFramework.Options;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.Options;

+ 38 - 2
src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/Migrations/20200324213904_Initial.Designer.cs

@@ -18,7 +18,7 @@ namespace Wasm.Authentication.Server.Data.Migrations
             modelBuilder
                 .HasAnnotation("ProductVersion", "3.1.2");
 
-            modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
                 {
                     b.Property<string>("UserCode")
                         .HasColumnType("TEXT")
@@ -60,7 +60,43 @@ namespace Wasm.Authentication.Server.Data.Migrations
                     b.ToTable("DeviceCodes");
                 });
 
-            modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
+                {
+                    b.Property<string>("Id")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Algorithm")
+                        .IsRequired()
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(100);
+
+                    b.Property<DateTime>("Created")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("Data")
+                        .IsRequired()
+                        .HasColumnType("TEXT");
+
+                    b.Property<bool>("DataProtected")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsX509Certificate")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Use")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Version")
+                        .HasColumnType("int");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("Use");
+
+                    b.ToTable("Keys");
+                });
+
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
                 {
                     b.Property<string>("Key")
                         .HasColumnType("TEXT")

+ 21 - 0
src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/Migrations/20200324213904_Initial.cs

@@ -63,6 +63,24 @@ namespace Wasm.Authentication.Server.Data.Migrations
                     table.PrimaryKey("PK_DeviceCodes", x => x.UserCode);
                 });
 
+            migrationBuilder.CreateTable(
+                name: "Keys",
+                columns: table => new
+                {
+                    Id = table.Column<string>(nullable: false),
+                    Version = table.Column<int>(nullable: false),
+                    Created = table.Column<DateTime>(nullable: false),
+                    Use = table.Column<string>(nullable: true),
+                    Algorithm = table.Column<string>(maxLength: 100, nullable: false),
+                    IsX509Certificate = table.Column<bool>(nullable: false),
+                    DataProtected = table.Column<bool>(nullable: false),
+                    Data = table.Column<string>(nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Keys", x => x.Id);
+                });
+
             migrationBuilder.CreateTable(
                 name: "PersistedGrants",
                 columns: table => new
@@ -290,6 +308,9 @@ namespace Wasm.Authentication.Server.Data.Migrations
             migrationBuilder.DropTable(
                 name: "DeviceCodes");
 
+           migrationBuilder.DropTable(
+                name: "Keys");
+
             migrationBuilder.DropTable(
                 name: "PersistedGrants");
 

+ 41 - 2
src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Data/Migrations/ApplicationDbContextModelSnapshot.cs

@@ -16,7 +16,7 @@ namespace Wasm.Authentication.Server.Data.Migrations
             modelBuilder
                 .HasAnnotation("ProductVersion", "5.0.0-rc.1.20416.1");
 
-            modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.DeviceFlowCodes", b =>
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
                 {
                     b.Property<string>("UserCode")
                         .HasMaxLength(200)
@@ -66,7 +66,46 @@ namespace Wasm.Authentication.Server.Data.Migrations
                     b.ToTable("DeviceCodes");
                 });
 
-            modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
+                {
+                    b.Property<string>("Id")
+                        .HasMaxLength(450)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Algorithm")
+                        .IsRequired()
+                        .HasMaxLength(100)
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("Created")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Data")
+                        .IsRequired()
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(50000);
+                        
+                    b.Property<bool>("DataProtected")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsX509Certificate")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Use")
+                        .HasMaxLength(450)
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Version")
+                        .HasColumnType("int");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("Use");
+
+                    b.ToTable("Keys");
+                });
+
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
                 {
                     b.Property<string>("Key")
                         .HasMaxLength(200)

+ 2 - 0
src/Components/WebAssembly/testassets/Wasm.Authentication.Server/Wasm.Authentication.Server.csproj

@@ -3,6 +3,8 @@
   <PropertyGroup>
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
 
+    <!-- IdentityServer packages are not signed -->
+    <NoWarn>CS8002</NoWarn>
     <!-- This project references the shared framework transitively. Prevent restore errors by setting this flag. -->
     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
   </PropertyGroup>

+ 3 - 1
src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/ApiAuthSample.csproj

@@ -3,13 +3,15 @@
   <PropertyGroup>
     <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
     <UserSecretsId>aspnet-ApiAuthSample-12ED8ECC-9EF1-4D31-87B4-1405B3198E5E</UserSecretsId>
+    <!-- IdentityServer packages are not strong named -->
+    <NoWarn>CS8002</NoWarn>
     <!-- We are a package that depends on the shared framework, this allows us to
          avoid errors during restore -->
     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
   </PropertyGroup>
 
   <ItemGroup>
-    <!-- Remove the reference to Microsoft.AspNetCore.App from IdentityServer4 -->
+    <!-- Remove the reference to Microsoft.AspNetCore.App from Duende.IdentityServer -->
     <FrameworkReference Remove="Microsoft.AspNetCore.App" />
     <Reference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" />
     <Reference Include="Microsoft.AspNetCore.CookiePolicy" />

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/ApplicationDbContext.cs

@@ -1,4 +1,4 @@
-using IdentityServer4.EntityFramework.Options;
+using Duende.IdentityServer.EntityFramework.Options;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.Options;

+ 90 - 3
src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/Migrations/20180919224505_InitialMigration.Designer.cs

@@ -18,32 +18,119 @@ namespace ApiAuthSample.Data.Migrations
             modelBuilder
                 .HasAnnotation("ProductVersion", "2.1.3-rtm-32065");
 
-            modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
+                {
+                    b.Property<string>("UserCode")
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(200);
+
+                    b.Property<string>("ClientId")
+                        .IsRequired()
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(200);
+
+                    b.Property<DateTime>("CreationTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Data")
+                        .IsRequired()
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(50000);
+
+                    b.Property<string>("DeviceCode")
+                        .IsRequired()
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(200);
+
+                    b.Property<DateTime?>("Expiration")
+                        .IsRequired()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("SubjectId")
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(200);
+
+                    b.HasKey("UserCode");
+
+                    b.HasIndex("DeviceCode")
+                        .IsUnique();
+
+                    b.HasIndex("Expiration");
+
+                    b.ToTable("DeviceCodes");
+                });
+
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
+                {
+                    b.Property<string>("Id")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Algorithm")
+                        .IsRequired()
+                        .HasColumnType("TEXT")
+                        .HasMaxLength(100);
+
+                    b.Property<DateTime>("Created")
+                        .HasColumnType("datetime2");
+
+                    b.Property<string>("Data")
+                        .IsRequired()
+                        .HasColumnType("TEXT");
+
+                    b.Property<bool>("DataProtected")
+                        .HasColumnType("bit");
+
+                    b.Property<bool>("IsX509Certificate")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Use")
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Version")
+                        .HasColumnType("int");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("Use");
+
+                    b.ToTable("Keys");
+                });
+
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
                 {
                     b.Property<string>("Key")
+                        .HasColumnType("TEXT")
                         .HasMaxLength(200);
 
                     b.Property<string>("ClientId")
                         .IsRequired()
+                        .HasColumnType("TEXT")
                         .HasMaxLength(200);
 
-                    b.Property<DateTime>("CreationTime");
+                    b.Property<DateTime>("CreationTime")
+                        .HasColumnType("TEXT");
 
                     b.Property<string>("Data")
                         .IsRequired()
+                        .HasColumnType("TEXT")
                         .HasMaxLength(50000);
 
-                    b.Property<DateTime?>("Expiration");
+                    b.Property<DateTime?>("Expiration")
+                        .HasColumnType("TEXT");
 
                     b.Property<string>("SubjectId")
+                        .HasColumnType("TEXT")
                         .HasMaxLength(200);
 
                     b.Property<string>("Type")
                         .IsRequired()
+                        .HasColumnType("TEXT")
                         .HasMaxLength(50);
 
                     b.HasKey("Key");
 
+                    b.HasIndex("Expiration");
+
                     b.HasIndex("SubjectId", "ClientId", "Type");
 
                     b.ToTable("PersistedGrants");

+ 35 - 0
src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/Migrations/20180919224505_InitialMigration.cs

@@ -46,6 +46,41 @@ namespace ApiAuthSample.Data.Migrations
                     table.PrimaryKey("PK_AspNetUsers", x => x.Id);
                 });
 
+            migrationBuilder.CreateTable(
+                name: "DeviceCodes",
+                columns: table => new
+                {
+                    UserCode = table.Column<string>(maxLength: 200, nullable: false),
+                    DeviceCode = table.Column<string>(maxLength: 200, nullable: false),
+                    SubjectId = table.Column<string>(maxLength: 200, nullable: true),
+                    ClientId = table.Column<string>(maxLength: 200, nullable: false),
+                    CreationTime = table.Column<DateTime>(nullable: false),
+                    Expiration = table.Column<DateTime>(nullable: false),
+                    Data = table.Column<string>(maxLength: 50000, nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_DeviceCodes", x => x.UserCode);
+                });
+
+            migrationBuilder.CreateTable(
+                name: "Keys",
+                columns: table => new
+                {
+                    Id = table.Column<string>(nullable: false),
+                    Version = table.Column<int>(nullable: false),
+                    Created = table.Column<DateTime>(nullable: false),
+                    Use = table.Column<string>(nullable: true),
+                    Algorithm = table.Column<string>(maxLength: 100, nullable: false),
+                    IsX509Certificate = table.Column<bool>(nullable: false),
+                    DataProtected = table.Column<bool>(nullable: false),
+                    Data = table.Column<string>(nullable: false)
+                },
+                constraints: table =>
+                {
+                    table.PrimaryKey("PK_Keys", x => x.Id);
+                });
+
             migrationBuilder.CreateTable(
                 name: "PersistedGrants",
                 columns: table => new

+ 119 - 8
src/Identity/ApiAuthorization.IdentityServer/samples/ApiAuthSample/Data/Migrations/ApplicationDbContextModelSnapshot.cs

@@ -16,34 +16,145 @@ namespace ApiAuthSample.Data.Migrations
             modelBuilder
                 .HasAnnotation("ProductVersion", "2.1.3-rtm-32065");
 
-            modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b =>
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes", b =>
                 {
-                    b.Property<string>("Key")
-                        .HasMaxLength(200);
+                    b.Property<string>("UserCode")
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
 
                     b.Property<string>("ClientId")
                         .IsRequired()
-                        .HasMaxLength(200);
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("CreationTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Data")
+                        .IsRequired()
+                        .HasMaxLength(50000)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Description")
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("DeviceCode")
+                        .IsRequired()
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime?>("Expiration")
+                        .IsRequired()
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("SessionId")
+                        .HasMaxLength(100)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("SubjectId")
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.HasKey("UserCode");
+
+                    b.HasIndex("DeviceCode")
+                        .IsUnique();
+
+                    b.HasIndex("Expiration");
+
+                    b.ToTable("DeviceCodes");
+                });
+
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.Key", b =>
+                {
+                    b.Property<string>("Id")
+                        .HasMaxLength(450)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Algorithm")
+                        .IsRequired()
+                        .HasMaxLength(100)
+                        .HasColumnType("TEXT");
 
-                    b.Property<DateTime>("CreationTime");
+                    b.Property<DateTime>("Created")
+                        .HasColumnType("TEXT");
 
                     b.Property<string>("Data")
                         .IsRequired()
+                        .HasColumnType("TEXT")
                         .HasMaxLength(50000);
+                        
+                    b.Property<bool>("DataProtected")
+                        .HasColumnType("bit");
 
-                    b.Property<DateTime?>("Expiration");
+                    b.Property<bool>("IsX509Certificate")
+                        .HasColumnType("bit");
+
+                    b.Property<string>("Use")
+                        .HasMaxLength(450)
+                        .HasColumnType("TEXT");
+
+                    b.Property<int>("Version")
+                        .HasColumnType("int");
+
+                    b.HasKey("Id");
+
+                    b.HasIndex("Use");
+
+                    b.ToTable("Keys");
+                });
+
+            modelBuilder.Entity("Duende.IdentityServer.EntityFramework.Entities.PersistedGrant", b =>
+                {
+                    b.Property<string>("Key")
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("ClientId")
+                        .IsRequired()
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime?>("ConsumedTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime>("CreationTime")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Data")
+                        .IsRequired()
+                        .HasMaxLength(50000)
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("Description")
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
+
+                    b.Property<DateTime?>("Expiration")
+                        .HasColumnType("TEXT");
+
+                    b.Property<string>("SessionId")
+                        .HasMaxLength(100)
+                        .HasColumnType("TEXT");
 
                     b.Property<string>("SubjectId")
-                        .HasMaxLength(200);
+                        .HasMaxLength(200)
+                        .HasColumnType("TEXT");
 
                     b.Property<string>("Type")
                         .IsRequired()
-                        .HasMaxLength(50);
+                        .HasMaxLength(50)
+                        .HasColumnType("TEXT");
 
                     b.HasKey("Key");
 
+                    b.HasIndex("Expiration");
+
                     b.HasIndex("SubjectId", "ClientId", "Type");
 
+                    b.HasIndex("SubjectId", "SessionId", "Type");
+
                     b.ToTable("PersistedGrants");
                 });
 

+ 0 - 0
src/Identity/ApiAuthorization.IdentityServer/src/ApiAuthorizationDbContext.cs


+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Authentication/AuthenticationBuilderExtensions.cs

@@ -2,7 +2,7 @@
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 using System;
-using IdentityServer4.Stores;
+using Duende.IdentityServer.Stores;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Authentication;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration;

+ 2 - 2
src/Identity/ApiAuthorization.IdentityServer/src/Authentication/IdentityServerJwtBearerOptionsConfiguration.cs

@@ -2,8 +2,8 @@
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 using System;
-using IdentityServer4.Extensions;
-using IdentityServer4.Stores;
+using Duende.IdentityServer.Extensions;
+using Duende.IdentityServer.Stores;
 using Microsoft.AspNetCore.Authentication.JwtBearer;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration;

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ApplicationProfilesPropertyNames.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ApplicationProfilesPropertyValues.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/AspNetConventionsConfigureOptions.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Configuration;
+using Duende.IdentityServer.Configuration;
 using Microsoft.AspNetCore.Identity;
 using Microsoft.Extensions.Options;
 

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureApiResources.cs

@@ -3,7 +3,7 @@
 
 using System;
 using System.Collections.Generic;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration;
 using Microsoft.Extensions.Configuration;

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureApiScopes.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using Microsoft.Extensions.Options;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureClientScopes.cs

@@ -3,7 +3,7 @@
 
 using System;
 using System.Linq;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using Microsoft.Extensions.Logging;
 using Microsoft.Extensions.Options;
 

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureClients.cs

@@ -3,7 +3,7 @@
 
 using System;
 using System.Collections.Generic;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.Logging;
 using Microsoft.Extensions.Options;

+ 5 - 5
src/Identity/ApiAuthorization.IdentityServer/src/Configuration/ConfigureIdentityResources.cs

@@ -34,31 +34,31 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
                 {
                     switch (scope)
                     {
-                        case IdentityServer4.IdentityServerConstants.StandardScopes.OpenId:
+                        case Duende.IdentityServer.IdentityServerConstants.StandardScopes.OpenId:
                             options.IdentityResources.Add(IdentityResourceBuilder.OpenId()
                                 .AllowAllClients()
                                 .FromConfiguration()
                                 .Build());
                             break;
-                        case IdentityServer4.IdentityServerConstants.StandardScopes.Profile:
+                        case Duende.IdentityServer.IdentityServerConstants.StandardScopes.Profile:
                             options.IdentityResources.Add(IdentityResourceBuilder.Profile()
                                 .AllowAllClients()
                                 .FromConfiguration()
                                 .Build());
                             break;
-                        case IdentityServer4.IdentityServerConstants.StandardScopes.Address:
+                        case Duende.IdentityServer.IdentityServerConstants.StandardScopes.Address:
                             options.IdentityResources.Add(IdentityResourceBuilder.Address()
                                 .AllowAllClients()
                                 .FromConfiguration()
                                 .Build());
                             break;
-                        case IdentityServer4.IdentityServerConstants.StandardScopes.Email:
+                        case Duende.IdentityServer.IdentityServerConstants.StandardScopes.Email:
                             options.IdentityResources.Add(IdentityResourceBuilder.Email()
                                 .AllowAllClients()
                                 .FromConfiguration()
                                 .Build());
                             break;
-                        case IdentityServer4.IdentityServerConstants.StandardScopes.Phone:
+                        case Duende.IdentityServer.IdentityServerConstants.StandardScopes.Phone:
                             options.IdentityResources.Add(IdentityResourceBuilder.Phone()
                                 .AllowAllClients()
                                 .FromConfiguration()

+ 9 - 4
src/Identity/ApiAuthorization.IdentityServer/src/Data/ApiAuthorizationDbContext.cs

@@ -3,10 +3,10 @@
 
 using System;
 using System.Threading.Tasks;
-using IdentityServer4.EntityFramework.Entities;
-using IdentityServer4.EntityFramework.Extensions;
-using IdentityServer4.EntityFramework.Interfaces;
-using IdentityServer4.EntityFramework.Options;
+using Duende.IdentityServer.EntityFramework.Entities;
+using Duende.IdentityServer.EntityFramework.Extensions;
+using Duende.IdentityServer.EntityFramework.Interfaces;
+using Duende.IdentityServer.EntityFramework.Options;
 using Microsoft.AspNetCore.Identity;
 using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
 using Microsoft.EntityFrameworkCore;
@@ -45,6 +45,11 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
         /// </summary>
         public DbSet<DeviceFlowCodes> DeviceFlowCodes { get; set; }
 
+        /// <summary>
+        /// Gets or sets the <see cref="DbSet{Key}"/>.
+        /// </summary>
+        public DbSet<Key> Keys { get; set; }
+
         Task<int> IPersistedGrantDbContext.SaveChangesAsync() => base.SaveChangesAsync();
 
         /// <inheritdoc />

+ 6 - 6
src/Identity/ApiAuthorization.IdentityServer/src/Extensions/AutoRedirectEndSessionEndpoint.cs

@@ -5,12 +5,12 @@ using System;
 using System.Collections.Specialized;
 using System.Net;
 using System.Threading.Tasks;
-using IdentityServer4.Configuration;
-using IdentityServer4.Endpoints.Results;
-using IdentityServer4.Extensions;
-using IdentityServer4.Hosting;
-using IdentityServer4.Services;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Configuration;
+using Duende.IdentityServer.Endpoints.Results;
+using Duende.IdentityServer.Extensions;
+using Duende.IdentityServer.Hosting;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Validation;
 using Microsoft.AspNetCore.Authentication;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.WebUtilities;

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Extensions/DefaultClientRequestParametersProvider.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Extensions;
+using Duende.IdentityServer.Extensions;
 using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.Options;
 using System;

+ 2 - 2
src/Identity/ApiAuthorization.IdentityServer/src/Extensions/RelativeRedirectUriValidator.cs

@@ -4,8 +4,8 @@
 using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
-using IdentityServer4.Models;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Validation;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {

+ 6 - 6
src/Identity/ApiAuthorization.IdentityServer/src/IdentityServerBuilderConfigurationExtensions.cs

@@ -4,12 +4,12 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using IdentityServer4.Configuration;
-using IdentityServer4.EntityFramework.Interfaces;
-using IdentityServer4.Hosting;
-using IdentityServer4.Models;
-using IdentityServer4.Stores;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Configuration;
+using Duende.IdentityServer.EntityFramework.Interfaces;
+using Duende.IdentityServer.Hosting;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Stores;
+using Duende.IdentityServer.Validation;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration;
 using Microsoft.EntityFrameworkCore;

+ 14 - 6
src/Identity/ApiAuthorization.IdentityServer/src/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.csproj

@@ -8,19 +8,27 @@
     <!-- We are a package that depends on the shared framework, this allows us to
          avoid errors during restore -->
     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
+    <!-- IdentityServer packages are not strong named -->
+    <NoWarn>CS8002</NoWarn>
     <Nullable>disable</Nullable>
   </PropertyGroup>
 
   <ItemGroup>
-    <!-- Remove the reference to Microsoft.AspNetCore.App from IdentityServer4 -->
+    <!-- Remove the reference to Microsoft.AspNetCore.App from Duende.IdentityServer -->
     <FrameworkReference Remove="Microsoft.AspNetCore.App" />
-    <Reference Include="IdentityServer4.AspNetIdentity" />
-    <Reference Include="IdentityServer4.EntityFramework" />
-    <Reference Include="IdentityServer4.EntityFramework.Storage" />
-    <Reference Include="IdentityServer4" />
-    <Reference Include="IdentityServer4.Storage" />
+    <Reference Include="Duende.IdentityServer.AspNetIdentity" />
+    <Reference Include="Duende.IdentityServer.EntityFramework" />
+    <Reference Include="Duende.IdentityServer.EntityFramework.Storage" />
+    <Reference Include="Duende.IdentityServer" />
+    <Reference Include="Duende.IdentityServer.Storage" />
     <Reference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
     <Reference Include="Microsoft.AspNetCore.Identity.UI" />
+    <Reference Include="Newtonsoft.Json" />
+    <SuppressBaselineReference Include="IdentityServer4.AspNetIdentity" />
+    <SuppressBaselineReference Include="IdentityServer4.EntityFramework" />
+    <SuppressBaselineReference Include="IdentityServer4.EntityFramework.Storage" />
+    <SuppressBaselineReference Include="IdentityServer4" />
+    <SuppressBaselineReference Include="IdentityServer4.Storage" />
 
     <!-- These references don't matter as they'll be replaced by the shared framework reference -->
     <Reference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />

+ 2 - 2
src/Identity/ApiAuthorization.IdentityServer/src/Options/ApiResourceBuilder.cs

@@ -3,7 +3,7 @@
 
 using System;
 using System.Linq;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {
@@ -112,7 +112,7 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
         /// <summary>
         /// Builds the API resource.
         /// </summary>
-        /// <returns>The built <see cref="IdentityServer4.Models.ApiResource"/>.</returns>
+        /// <returns>The built <see cref="Duende.IdentityServer.Models.ApiResource"/>.</returns>
         public ApiResource Build()
         {
             if (_built)

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Options/ApiResourceCollection.cs

@@ -4,7 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Options/ApiScopeCollection.cs

@@ -4,7 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {

+ 2 - 2
src/Identity/ApiAuthorization.IdentityServer/src/Options/ClientBuilder.cs

@@ -3,8 +3,8 @@
 
 using System;
 using System.Collections.Generic;
-using IdentityServer4;
-using IdentityServer4.Models;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Options/ClientCollection.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;

+ 5 - 5
src/Identity/ApiAuthorization.IdentityServer/src/Options/IdentityResourceBuilder.cs

@@ -1,9 +1,9 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
 using System;
-using IdentityServer4;
-using IdentityServer4.Models;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Models;
 
 namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
 {
@@ -74,7 +74,7 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
         /// <summary>
         /// Builds the API resource.
         /// </summary>
-        /// <returns>The built <see cref="IdentityServer4.Models.IdentityResource"/>.</returns>
+        /// <returns>The built <see cref="Duende.IdentityServer.Models.IdentityResource"/>.</returns>
         public IdentityResource Build()
         {
             if (_built)
@@ -129,4 +129,4 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer
             }
         }
     }
-}
+}

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/src/Options/IdentityResourceCollection.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using System;
 using System.Collections.Generic;
 using System.Collections.ObjectModel;

+ 51 - 0
src/Identity/ApiAuthorization.IdentityServer/src/PublicAPI.Unshipped.txt

@@ -1 +1,52 @@
 #nullable enable
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.ApiAuthorizationDbContext(Microsoft.EntityFrameworkCore.DbContextOptions options, Microsoft.Extensions.Options.IOptions<IdentityServer4.EntityFramework.Options.OperationalStoreOptions> operationalStoreOptions) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.DeviceFlowCodes.get -> Microsoft.EntityFrameworkCore.DbSet<IdentityServer4.EntityFramework.Entities.DeviceFlowCodes>
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.PersistedGrants.get -> Microsoft.EntityFrameworkCore.DbSet<IdentityServer4.EntityFramework.Entities.PersistedGrant>
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder.ApiResourceBuilder(IdentityServer4.Models.ApiResource resource) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder.Build() -> IdentityServer4.Models.ApiResource
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection.AddRange(params IdentityServer4.Models.ApiResource[] resources) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection.ApiResourceCollection(System.Collections.Generic.IList<IdentityServer4.Models.ApiResource> list) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection.this[string key].get -> IdentityServer4.Models.ApiResource
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiScopeCollection.AddRange(params IdentityServer4.Models.ApiScope[] scopes) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiScopeCollection.ApiScopeCollection(System.Collections.Generic.IList<IdentityServer4.Models.ApiScope> list) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiScopeCollection.this[string key].get -> IdentityServer4.Models.ApiScope
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder.Build() -> IdentityServer4.Models.Client
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder.ClientBuilder(IdentityServer4.Models.Client client) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddIdentityServerSPA(string clientId, System.Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder> configure) -> IdentityServer4.Models.Client
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddNativeApp(string clientId, System.Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder> configure) -> IdentityServer4.Models.Client
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddRange(params IdentityServer4.Models.Client[] clients) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddSPA(string clientId, System.Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder> configure) -> IdentityServer4.Models.Client
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.ClientCollection(System.Collections.Generic.IList<IdentityServer4.Models.Client> list) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.this[string key].get -> IdentityServer4.Models.Client
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder.Build() -> IdentityServer4.Models.IdentityResource
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder.IdentityResourceBuilder(IdentityServer4.Models.IdentityResource resource) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection.AddRange(params IdentityServer4.Models.IdentityResource[] identityResources) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection.IdentityResourceCollection(System.Collections.Generic.IList<IdentityServer4.Models.IdentityResource> list) -> void
+*REMOVED*~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection.this[string key].get -> IdentityServer4.Models.IdentityResource
+*REMOVED*~static Microsoft.Extensions.DependencyInjection.IdentityServerBuilderConfigurationExtensions.AddSigningCredentials(this Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration) -> Microsoft.Extensions.DependencyInjection.IIdentityServerBuilder
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.ApiAuthorizationDbContext(Microsoft.EntityFrameworkCore.DbContextOptions options, Microsoft.Extensions.Options.IOptions<Duende.IdentityServer.EntityFramework.Options.OperationalStoreOptions> operationalStoreOptions) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.DeviceFlowCodes.get -> Microsoft.EntityFrameworkCore.DbSet<Duende.IdentityServer.EntityFramework.Entities.DeviceFlowCodes>
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.Keys.get -> Microsoft.EntityFrameworkCore.DbSet<Duende.IdentityServer.EntityFramework.Entities.Key>
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.Keys.set -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext<TUser>.PersistedGrants.get -> Microsoft.EntityFrameworkCore.DbSet<Duende.IdentityServer.EntityFramework.Entities.PersistedGrant>
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder.ApiResourceBuilder(Duende.IdentityServer.Models.ApiResource resource) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceBuilder.Build() -> Duende.IdentityServer.Models.ApiResource
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection.AddRange(params Duende.IdentityServer.Models.ApiResource[] resources) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection.ApiResourceCollection(System.Collections.Generic.IList<Duende.IdentityServer.Models.ApiResource> list) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiResourceCollection.this[string key].get -> Duende.IdentityServer.Models.ApiResource
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiScopeCollection.AddRange(params Duende.IdentityServer.Models.ApiScope[] scopes) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiScopeCollection.ApiScopeCollection(System.Collections.Generic.IList<Duende.IdentityServer.Models.ApiScope> list) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiScopeCollection.this[string key].get -> Duende.IdentityServer.Models.ApiScope
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder.Build() -> Duende.IdentityServer.Models.Client
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder.ClientBuilder(Duende.IdentityServer.Models.Client client) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddIdentityServerSPA(string clientId, System.Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder> configure) -> Duende.IdentityServer.Models.Client
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddNativeApp(string clientId, System.Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder> configure) -> Duende.IdentityServer.Models.Client
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddRange(params Duende.IdentityServer.Models.Client[] clients) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.AddSPA(string clientId, System.Action<Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientBuilder> configure) -> Duende.IdentityServer.Models.Client
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.ClientCollection(System.Collections.Generic.IList<Duende.IdentityServer.Models.Client> list) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ClientCollection.this[string key].get -> Duende.IdentityServer.Models.Client
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder.Build() -> Duende.IdentityServer.Models.IdentityResource
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceBuilder.IdentityResourceBuilder(Duende.IdentityServer.Models.IdentityResource resource) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection.AddRange(params Duende.IdentityServer.Models.IdentityResource[] identityResources) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection.IdentityResourceCollection(System.Collections.Generic.IList<Duende.IdentityServer.Models.IdentityResource> list) -> void
+~Microsoft.AspNetCore.ApiAuthorization.IdentityServer.IdentityResourceCollection.this[string key].get -> Duende.IdentityServer.Models.IdentityResource

+ 2 - 2
src/Identity/ApiAuthorization.IdentityServer/test/Authentication/LocalApiJwtBearerConfigurationTest.cs

@@ -4,8 +4,8 @@
 using System.Collections.Generic;
 using System.Security.Cryptography;
 using System.Threading.Tasks;
-using IdentityServer4.Configuration;
-using IdentityServer4.Stores;
+using Duende.IdentityServer.Configuration;
+using Duende.IdentityServer.Stores;
 using Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Configuration;
 using Microsoft.AspNetCore.Authentication;
 using Microsoft.AspNetCore.Authentication.JwtBearer;

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/test/Configuration/AspNetConventionsConfigureOptionsTests.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Configuration;
+using Duende.IdentityServer.Configuration;
 using Microsoft.AspNetCore.Identity;
 using Xunit;
 

+ 2 - 2
src/Identity/ApiAuthorization.IdentityServer/test/Configuration/ConfigureClientsTests.cs

@@ -1,8 +1,8 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4;
-using IdentityServer4.Models;
+using Duende.IdentityServer;
+using Duende.IdentityServer.Models;
 using Microsoft.Extensions.Configuration;
 using System;
 using System.Collections.Generic;

+ 5 - 5
src/Identity/ApiAuthorization.IdentityServer/test/Extensions/AutoRedirectEndSessionEndpointTests.cs

@@ -5,11 +5,11 @@ using System.Collections.Generic;
 using System.Collections.Specialized;
 using System.Security.Claims;
 using System.Threading.Tasks;
-using IdentityServer4.Configuration;
-using IdentityServer4.Endpoints.Results;
-using IdentityServer4.Models;
-using IdentityServer4.Services;
-using IdentityServer4.Validation;
+using Duende.IdentityServer.Configuration;
+using Duende.IdentityServer.Endpoints.Results;
+using Duende.IdentityServer.Models;
+using Duende.IdentityServer.Services;
+using Duende.IdentityServer.Validation;
 using Microsoft.AspNetCore.Authentication;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Identity;

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/test/Extensions/DefaultClientRequestParametersProviderTests.cs

@@ -3,7 +3,7 @@
 
 using System;
 using System.Collections.Generic;
-using IdentityServer4.Configuration;
+using Duende.IdentityServer.Configuration;
 using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Options;

+ 5 - 3
src/Identity/ApiAuthorization.IdentityServer/test/Extensions/IdentityServerBuilderConfigurationExtensionsTests.cs

@@ -4,9 +4,9 @@
 using System;
 using System.Collections.Generic;
 using System.Threading.Tasks;
-using IdentityServer4.EntityFramework.Entities;
-using IdentityServer4.EntityFramework.Interfaces;
-using IdentityServer4.Stores;
+using Duende.IdentityServer.EntityFramework.Entities;
+using Duende.IdentityServer.EntityFramework.Interfaces;
+using Duende.IdentityServer.Stores;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Testing;
 using Microsoft.EntityFrameworkCore;
@@ -109,6 +109,8 @@ namespace Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Extensions
 
             public DbSet<DeviceFlowCodes> DeviceFlowCodes { get; set; }
 
+            public DbSet<Key> Keys { get; set; }
+
             public Task<int> SaveChangesAsync()
             {
                 throw new NotImplementedException();

+ 1 - 1
src/Identity/ApiAuthorization.IdentityServer/test/Extensions/RelativeRedirectUriValidatorTests.cs

@@ -1,7 +1,7 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
 
-using IdentityServer4.Models;
+using Duende.IdentityServer.Models;
 using Microsoft.AspNetCore.Http;
 using System.Collections.Generic;
 using System.Threading.Tasks;

+ 3 - 1
src/Identity/ApiAuthorization.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj

@@ -5,10 +5,12 @@
     <!-- We are a package that depends on the shared framework, this allows us to
          avoid errors during restore -->
     <GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
+    <!-- IdentityServer packages are not strong named -->
+    <NoWarn>CS8002</NoWarn>
   </PropertyGroup>
 
   <ItemGroup>
-      <!-- Remove the reference to Microsoft.AspNetCore.App from IdentityServer4 -->
+      <!-- Remove the reference to Microsoft.AspNetCore.App from Duende.IdentityServer -->
     <FrameworkReference Remove="Microsoft.AspNetCore.App" />
 
     <Reference Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" />