Skip to content

IdentityServer4 -> Duende the Sequel #34321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions eng/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ protected override void Up(MigrationBuilder migrationBuilder)
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
Expand Down Expand Up @@ -253,6 +271,16 @@ protected override void Up(MigrationBuilder migrationBuilder)
table: "DeviceCodes",
column: "Expiration");

migrationBuilder.CreateIndex(
name: "IX_Keys_Use",
table: "Keys",
column: "Use");

migrationBuilder.CreateIndex(
name: "IX_PersistedGrants_ConsumedTime",
table: "PersistedGrants",
column: "ConsumedTime");

migrationBuilder.CreateIndex(
name: "IX_PersistedGrants_Expiration",
table: "PersistedGrants",
Expand Down Expand Up @@ -290,6 +318,9 @@ protected override void Down(MigrationBuilder migrationBuilder)
migrationBuilder.DropTable(
name: "DeviceCodes");

migrationBuilder.DropTable(
name: "Keys");

migrationBuilder.DropTable(
name: "PersistedGrants");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
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)
Expand Down Expand Up @@ -66,7 +66,46 @@ protected override void BuildModel(ModelBuilder modelBuilder)
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<PropertyGroup>
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>

<!-- IdentityServer packages are not strong named. -->
<NoWarn>CS8002</NoWarn>
<!-- This project references the shared framework transitively. Prevent restore errors by setting this flag. -->
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading