diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaimConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaimConsts.cs
new file mode 100644
index 0000000000..a87d3566fc
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceClaimConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.ApiResources
+{
+ public class ApiResourceClaimConsts
+ {
+ public const int TypeMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs
new file mode 100644
index 0000000000..1c3aecc531
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs
@@ -0,0 +1,9 @@
+namespace Volo.Abp.IdentityServer.ApiResources
+{
+ public class ApiResourceConsts
+ {
+ public const int NameMaxLength = 200;
+ public const int DisplayNameMaxLength = 200;
+ public const int DescriptionMaxLength = 1000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaimConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaimConsts.cs
new file mode 100644
index 0000000000..5e06a29402
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeClaimConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.ApiResources
+{
+ public class ApiScopeClaimConsts
+ {
+ public const int TypeMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs
new file mode 100644
index 0000000000..d52b953921
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs
@@ -0,0 +1,9 @@
+namespace Volo.Abp.IdentityServer.ApiResources
+{
+ public class ApiScopeConsts
+ {
+ public const int NameMaxLength = 200;
+ public const int DisplayNameMaxLength = 200;
+ public const int DescriptionMaxLength = 1000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs
index c18fe95372..2e656dcc3d 100644
--- a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecret.cs
@@ -4,7 +4,7 @@ namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiSecret : Secret
{
- public virtual string ApiResourceId { get; set; }
+ public virtual Guid ApiResourceId { get; set; }
protected ApiSecret()
{
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecretConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecretConsts.cs
new file mode 100644
index 0000000000..5008a34afb
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/ApiSecretConsts.cs
@@ -0,0 +1,9 @@
+namespace Volo.Abp.IdentityServer.ApiResources
+{
+ public class ApiSecretConsts
+ {
+ public const int DescriptionMaxLength = 1000;
+ public const int ValueMaxLength = 2000;
+ public const int TypeMaxLength = 250;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaimConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaimConsts.cs
new file mode 100644
index 0000000000..3a5d1fe907
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientClaimConsts.cs
@@ -0,0 +1,8 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientClaimConsts
+ {
+ public const int TypeMaxLength = 250;
+ public const int ValueMaxLength = 250;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientConsts.cs
new file mode 100644
index 0000000000..d83138fd2f
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientConsts.cs
@@ -0,0 +1,25 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientConsts
+ {
+ public const int ClientIdMaxLength = 200;
+
+ public const int ProtocolTypeMaxLength = 200;
+
+ public const int ClientNameMaxLength = 200;
+
+ public const int ClientUriMaxLength = 2000;
+
+ public const int LogoUriMaxLength = 2000;
+
+ public const int DescriptionMaxLength = 1000;
+
+ public const int FrontChannelLogoutUriMaxLength = 2000;
+
+ public const int BackChannelLogoutUriMaxLength = 2000;
+
+ public const int ClientClaimsPrefixMaxLength = 200;
+
+ public const int PairWiseSubjectSaltMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientCorsOriginConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientCorsOriginConsts.cs
new file mode 100644
index 0000000000..07ba598d6c
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientCorsOriginConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientCorsOriginConsts
+ {
+ public const int OriginMaxLength = 150;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs
new file mode 100644
index 0000000000..5f94c51f97
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientGrantTypeConsts
+ {
+ public const int GrantTypeMaxLength = 250;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientIdPRestrictionConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientIdPRestrictionConsts.cs
new file mode 100644
index 0000000000..c71301871a
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientIdPRestrictionConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientIdPRestrictionConsts
+ {
+ public const int ProviderMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUriConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUriConsts.cs
new file mode 100644
index 0000000000..8fe55ba018
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUriConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientPostLogoutRedirectUriConsts
+ {
+ public const int PostLogoutRedirectUriMaxLength = 2000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPropertyConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPropertyConsts.cs
new file mode 100644
index 0000000000..6535304596
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientPropertyConsts.cs
@@ -0,0 +1,8 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientPropertyConsts
+ {
+ public const int KeyMaxLength = 250;
+ public const int ValueMaxLength = 2000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientRedirectUriConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientRedirectUriConsts.cs
new file mode 100644
index 0000000000..d67bbea509
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientRedirectUriConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientRedirectUriConsts
+ {
+ public const int RedirectUriMaxLength = 2000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientScopeConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientScopeConsts.cs
new file mode 100644
index 0000000000..6a5b62e692
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientScopeConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientScopeConsts
+ {
+ public const int ScopeMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs
new file mode 100644
index 0000000000..f3e47a5973
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs
@@ -0,0 +1,9 @@
+namespace Volo.Abp.IdentityServer.Clients
+{
+ public class ClientSecretConsts
+ {
+ public const int ValueMaxLength = 2000;
+ public const int TypeMaxLength = 250;
+ public const int DescriptionMaxLength = 2000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs
new file mode 100644
index 0000000000..75f67dcc3a
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs
@@ -0,0 +1,10 @@
+namespace Volo.Abp.IdentityServer.Grants
+{
+ public class PersistedGrantConsts
+ {
+ public const int KeyMaxLength = 200;
+ public const int TypeMaxLength = 50;
+ public const int SubjectIdMaxLength = 200;
+ public const int ClientIdMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityClaimConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityClaimConsts.cs
new file mode 100644
index 0000000000..5a0ee5e177
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityClaimConsts.cs
@@ -0,0 +1,7 @@
+namespace Volo.Abp.IdentityServer.IdentityResources
+{
+ public class IdentityClaimConsts
+ {
+ public const int TypeMaxLength = 200;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs
new file mode 100644
index 0000000000..c60cc34ad8
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs
@@ -0,0 +1,9 @@
+namespace Volo.Abp.IdentityServer.IdentityResources
+{
+ public class IdentityResourceConsts
+ {
+ public const int NameMaxLength = 200;
+ public const int DisplayNameMaxLength = 200;
+ public const int DescriptionMaxLength = 1000;
+ }
+}
\ No newline at end of file
diff --git a/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/20180108150119_IdentityServer_Initial.Designer.cs b/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/20180108150119_IdentityServer_Initial.Designer.cs
new file mode 100644
index 0000000000..580a47ec10
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/20180108150119_IdentityServer_Initial.Designer.cs
@@ -0,0 +1,609 @@
+//
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage;
+using Microsoft.EntityFrameworkCore.Storage.Internal;
+using System;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+
+namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
+{
+ [DbContext(typeof(IdentityServerDbContext))]
+ [Migration("20180108150119_IdentityServer_Initial")]
+ partial class IdentityServer_Initial
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.0.0-rtm-26452")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasMaxLength(200);
+
+ b.Property("Enabled");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpIdsApiResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiResourceId");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiResourceId");
+
+ b.ToTable("AbpIdsApiClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiResourceId");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasMaxLength(200);
+
+ b.Property("Emphasize");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("Required");
+
+ b.Property("ShowInDiscoveryDocument");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiResourceId");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpIdsApiScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiScopeId");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiScopeId");
+
+ b.ToTable("AbpIdsApiScopeClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiResourceId");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("Expiration");
+
+ b.Property("Type")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .HasMaxLength(2000);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiResourceId");
+
+ b.ToTable("AbpIdsApiSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AbsoluteRefreshTokenLifetime");
+
+ b.Property("AccessTokenLifetime");
+
+ b.Property("AccessTokenType");
+
+ b.Property("AllowAccessTokensViaBrowser");
+
+ b.Property("AllowOfflineAccess");
+
+ b.Property("AllowPlainTextPkce");
+
+ b.Property("AllowRememberConsent");
+
+ b.Property("AlwaysIncludeUserClaimsInIdToken");
+
+ b.Property("AlwaysSendClientClaims");
+
+ b.Property("AuthorizationCodeLifetime");
+
+ b.Property("BackChannelLogoutSessionRequired");
+
+ b.Property("BackChannelLogoutUri")
+ .HasMaxLength(2000);
+
+ b.Property("ClientClaimsPrefix")
+ .HasMaxLength(200);
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("ClientName")
+ .HasMaxLength(200);
+
+ b.Property("ClientUri")
+ .HasMaxLength(2000);
+
+ b.Property("ConsentLifetime");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("EnableLocalLogin");
+
+ b.Property("Enabled");
+
+ b.Property("FrontChannelLogoutSessionRequired");
+
+ b.Property("FrontChannelLogoutUri")
+ .HasMaxLength(2000);
+
+ b.Property("IdentityTokenLifetime");
+
+ b.Property("IncludeJwtId");
+
+ b.Property("LogoUri")
+ .HasMaxLength(2000);
+
+ b.Property("PairWiseSubjectSalt")
+ .HasMaxLength(200);
+
+ b.Property("ProtocolType")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("RefreshTokenExpiration");
+
+ b.Property("RefreshTokenUsage");
+
+ b.Property("RequireClientSecret");
+
+ b.Property("RequireConsent");
+
+ b.Property("RequirePkce");
+
+ b.Property("SlidingRefreshTokenLifetime");
+
+ b.Property("UpdateAccessTokenClaimsOnRefresh");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId")
+ .IsUnique();
+
+ b.ToTable("AbpIdsClients");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(250);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("Origin")
+ .IsRequired()
+ .HasMaxLength(150);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientCorsOrigins");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("GrantType")
+ .IsRequired()
+ .HasMaxLength(250);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientGrantTypes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("Provider")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientIdPRestrictions");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("PostLogoutRedirectUri")
+ .IsRequired()
+ .HasMaxLength(2000);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientPostLogoutRedirectUris");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(2000);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientProperties");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("RedirectUri")
+ .IsRequired()
+ .HasMaxLength(2000);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientRedirectUris");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("Scope")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClientId");
+
+ b.Property("Description")
+ .HasMaxLength(2000);
+
+ b.Property("Expiration");
+
+ b.Property("Type")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(2000);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClientId");
+
+ b.ToTable("AbpIdsClientSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
+ {
+ b.Property("Key")
+ .HasMaxLength(200);
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("CreationTime");
+
+ b.Property("Data")
+ .IsRequired();
+
+ b.Property("Expiration");
+
+ b.Property("Id");
+
+ b.Property("SubjectId")
+ .HasMaxLength(200);
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(50);
+
+ b.HasKey("Key");
+
+ b.HasIndex("SubjectId", "ClientId", "Type");
+
+ b.ToTable("AbpIdsPersistedGrants");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("IdentityResourceId");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("IdentityResourceId");
+
+ b.ToTable("AbpIdsIdentityClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasMaxLength(200);
+
+ b.Property("Emphasize");
+
+ b.Property("Enabled");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("Required");
+
+ b.Property("ShowInDiscoveryDocument");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpIdsIdentityResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource")
+ .WithMany("UserClaims")
+ .HasForeignKey("ApiResourceId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource")
+ .WithMany("Scopes")
+ .HasForeignKey("ApiResourceId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope")
+ .WithMany("UserClaims")
+ .HasForeignKey("ApiScopeId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource")
+ .WithMany("Secrets")
+ .HasForeignKey("ApiResourceId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("Claims")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("AllowedCorsOrigins")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("AllowedGrantTypes")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("IdentityProviderRestrictions")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("PostLogoutRedirectUris")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("Properties")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("RedirectUris")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("AllowedScopes")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
+ .WithMany("ClientSecrets")
+ .HasForeignKey("ClientId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
+ {
+ b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource")
+ .WithMany("UserClaims")
+ .HasForeignKey("IdentityResourceId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/20180108150119_IdentityServer_Initial.cs b/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/20180108150119_IdentityServer_Initial.cs
new file mode 100644
index 0000000000..e335b5dc75
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/20180108150119_IdentityServer_Initial.cs
@@ -0,0 +1,543 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+using System;
+using System.Collections.Generic;
+
+namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
+{
+ public partial class IdentityServer_Initial : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "AbpIdsApiResources",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
+ DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ Enabled = table.Column(type: "bit", nullable: false),
+ Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsApiResources", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClients",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false),
+ AccessTokenLifetime = table.Column(type: "int", nullable: false),
+ AccessTokenType = table.Column(type: "int", nullable: false),
+ AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false),
+ AllowOfflineAccess = table.Column(type: "bit", nullable: false),
+ AllowPlainTextPkce = table.Column(type: "bit", nullable: false),
+ AllowRememberConsent = table.Column(type: "bit", nullable: false),
+ AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false),
+ AlwaysSendClientClaims = table.Column(type: "bit", nullable: false),
+ AuthorizationCodeLifetime = table.Column(type: "int", nullable: false),
+ BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false),
+ BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
+ ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
+ ConsentLifetime = table.Column(type: "int", nullable: true),
+ Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
+ EnableLocalLogin = table.Column(type: "bit", nullable: false),
+ Enabled = table.Column(type: "bit", nullable: false),
+ FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false),
+ FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
+ IdentityTokenLifetime = table.Column(type: "int", nullable: false),
+ IncludeJwtId = table.Column(type: "bit", nullable: false),
+ LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
+ PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ RefreshTokenExpiration = table.Column(type: "int", nullable: false),
+ RefreshTokenUsage = table.Column(type: "int", nullable: false),
+ RequireClientSecret = table.Column(type: "bit", nullable: false),
+ RequireConsent = table.Column(type: "bit", nullable: false),
+ RequirePkce = table.Column(type: "bit", nullable: false),
+ SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false),
+ UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClients", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsIdentityResources",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
+ DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ Emphasize = table.Column(type: "bit", nullable: false),
+ Enabled = table.Column(type: "bit", nullable: false),
+ Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ Required = table.Column(type: "bit", nullable: false),
+ ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsIdentityResources", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsPersistedGrants",
+ columns: table => new
+ {
+ Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ CreationTime = table.Column(type: "datetime2", nullable: false),
+ Data = table.Column(type: "nvarchar(max)", nullable: false),
+ Expiration = table.Column(type: "datetime2", nullable: true),
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsPersistedGrants", x => x.Key);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsApiClaims",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false),
+ Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsApiClaims", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsApiClaims_AbpIdsApiResources_ApiResourceId",
+ column: x => x.ApiResourceId,
+ principalTable: "AbpIdsApiResources",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsApiScopes",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false),
+ Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
+ DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true),
+ Emphasize = table.Column(type: "bit", nullable: false),
+ Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
+ Required = table.Column(type: "bit", nullable: false),
+ ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsApiScopes", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsApiScopes_AbpIdsApiResources_ApiResourceId",
+ column: x => x.ApiResourceId,
+ principalTable: "AbpIdsApiResources",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsApiSecrets",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ApiResourceId = table.Column(type: "uniqueidentifier", nullable: false),
+ Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
+ Expiration = table.Column(type: "datetime2", nullable: true),
+ Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true),
+ Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsApiSecrets", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsApiSecrets_AbpIdsApiResources_ApiResourceId",
+ column: x => x.ApiResourceId,
+ principalTable: "AbpIdsApiResources",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientClaims",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false),
+ Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientClaims", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientClaims_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientCorsOrigins",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientCorsOrigins", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientCorsOrigins_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientGrantTypes",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientGrantTypes", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientGrantTypes_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientIdPRestrictions",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientIdPRestrictions", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientIdPRestrictions_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientPostLogoutRedirectUris",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientPostLogoutRedirectUris", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientPostLogoutRedirectUris_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientProperties",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false),
+ Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientProperties", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientProperties_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientRedirectUris",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientRedirectUris", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientRedirectUris_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientScopes",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientScopes", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientScopes_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsClientSecrets",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ClientId = table.Column(type: "uniqueidentifier", nullable: false),
+ Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true),
+ Expiration = table.Column(type: "datetime2", nullable: true),
+ Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true),
+ Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsClientSecrets", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsClientSecrets_AbpIdsClients_ClientId",
+ column: x => x.ClientId,
+ principalTable: "AbpIdsClients",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsIdentityClaims",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ IdentityResourceId = table.Column(type: "uniqueidentifier", nullable: false),
+ Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsIdentityClaims", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsIdentityClaims_AbpIdsIdentityResources_IdentityResourceId",
+ column: x => x.IdentityResourceId,
+ principalTable: "AbpIdsIdentityResources",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpIdsApiScopeClaims",
+ columns: table => new
+ {
+ Id = table.Column(type: "uniqueidentifier", nullable: false),
+ ApiScopeId = table.Column(type: "uniqueidentifier", nullable: false),
+ Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpIdsApiScopeClaims", x => x.Id);
+ table.ForeignKey(
+ name: "FK_AbpIdsApiScopeClaims_AbpIdsApiScopes_ApiScopeId",
+ column: x => x.ApiScopeId,
+ principalTable: "AbpIdsApiScopes",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsApiClaims_ApiResourceId",
+ table: "AbpIdsApiClaims",
+ column: "ApiResourceId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsApiResources_Name",
+ table: "AbpIdsApiResources",
+ column: "Name",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsApiScopeClaims_ApiScopeId",
+ table: "AbpIdsApiScopeClaims",
+ column: "ApiScopeId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsApiScopes_ApiResourceId",
+ table: "AbpIdsApiScopes",
+ column: "ApiResourceId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsApiScopes_Name",
+ table: "AbpIdsApiScopes",
+ column: "Name",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsApiSecrets_ApiResourceId",
+ table: "AbpIdsApiSecrets",
+ column: "ApiResourceId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientClaims_ClientId",
+ table: "AbpIdsClientClaims",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientCorsOrigins_ClientId",
+ table: "AbpIdsClientCorsOrigins",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientGrantTypes_ClientId",
+ table: "AbpIdsClientGrantTypes",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientIdPRestrictions_ClientId",
+ table: "AbpIdsClientIdPRestrictions",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientPostLogoutRedirectUris_ClientId",
+ table: "AbpIdsClientPostLogoutRedirectUris",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientProperties_ClientId",
+ table: "AbpIdsClientProperties",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientRedirectUris_ClientId",
+ table: "AbpIdsClientRedirectUris",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClients_ClientId",
+ table: "AbpIdsClients",
+ column: "ClientId",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientScopes_ClientId",
+ table: "AbpIdsClientScopes",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsClientSecrets_ClientId",
+ table: "AbpIdsClientSecrets",
+ column: "ClientId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsIdentityClaims_IdentityResourceId",
+ table: "AbpIdsIdentityClaims",
+ column: "IdentityResourceId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsIdentityResources_Name",
+ table: "AbpIdsIdentityResources",
+ column: "Name",
+ unique: true);
+
+ migrationBuilder.CreateIndex(
+ name: "IX_AbpIdsPersistedGrants_SubjectId_ClientId_Type",
+ table: "AbpIdsPersistedGrants",
+ columns: new[] { "SubjectId", "ClientId", "Type" });
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "AbpIdsApiClaims");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsApiScopeClaims");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsApiSecrets");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientClaims");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientCorsOrigins");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientGrantTypes");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientIdPRestrictions");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientPostLogoutRedirectUris");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientProperties");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientRedirectUris");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientScopes");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClientSecrets");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsIdentityClaims");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsPersistedGrants");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsApiScopes");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsClients");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsIdentityResources");
+
+ migrationBuilder.DropTable(
+ name: "AbpIdsApiResources");
+ }
+ }
+}
diff --git a/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerDbContextModelSnapshot.cs b/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerDbContextModelSnapshot.cs
new file mode 100644
index 0000000000..8fc627b5ff
--- /dev/null
+++ b/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Migrations/IdentityServerDbContextModelSnapshot.cs
@@ -0,0 +1,608 @@
+//
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage;
+using Microsoft.EntityFrameworkCore.Storage.Internal;
+using System;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+
+namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
+{
+ [DbContext(typeof(IdentityServerDbContext))]
+ partial class IdentityServerDbContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.0.0-rtm-26452")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasMaxLength(200);
+
+ b.Property("Enabled");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpIdsApiResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiResourceId");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiResourceId");
+
+ b.ToTable("AbpIdsApiClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiResourceId");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasMaxLength(200);
+
+ b.Property("Emphasize");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("Required");
+
+ b.Property("ShowInDiscoveryDocument");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiResourceId");
+
+ b.HasIndex("Name")
+ .IsUnique();
+
+ b.ToTable("AbpIdsApiScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiScopeId");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiScopeId");
+
+ b.ToTable("AbpIdsApiScopeClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApiResourceId");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("Expiration");
+
+ b.Property("Type")
+ .HasMaxLength(250);
+
+ b.Property("Value")
+ .HasMaxLength(2000);
+
+ b.HasKey("Id");
+
+ b.HasIndex("ApiResourceId");
+
+ b.ToTable("AbpIdsApiSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AbsoluteRefreshTokenLifetime");
+
+ b.Property("AccessTokenLifetime");
+
+ b.Property("AccessTokenType");
+
+ b.Property("AllowAccessTokensViaBrowser");
+
+ b.Property("AllowOfflineAccess");
+
+ b.Property("AllowPlainTextPkce");
+
+ b.Property