Skip to content

Commit 8c4356c

Browse files
authored
feat: OpenIdConnect supports PostgreSQL (#744)
1 parent 433b3eb commit 8c4356c

28 files changed

+411
-0
lines changed

Masa.Framework.sln

+11
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Utils.DynamicsCrm.Core
625625
EndProject
626626
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Utils.DynamicsCrm.EntityFrameworkCore", "src\Utils\DynamicsCrm\Masa.Utils.DynamicsCrm.EntityFrameworkCore\Masa.Utils.DynamicsCrm.EntityFrameworkCore.csproj", "{8A51A2A9-FBF4-40DC-AD89-AD3B9D3A50DC}"
627627
EndProject
628+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql", "src\Contrib\Authentication\OpenIdConnect\Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql\Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.csproj", "{F100414F-CD8D-49D4-BFE0-88D94E53E628}"
629+
EndProject
628630
Global
629631
GlobalSection(SolutionConfigurationPlatforms) = preSolution
630632
Debug|Any CPU = Debug|Any CPU
@@ -2185,6 +2187,14 @@ Global
21852187
{8A51A2A9-FBF4-40DC-AD89-AD3B9D3A50DC}.Release|Any CPU.Build.0 = Release|Any CPU
21862188
{8A51A2A9-FBF4-40DC-AD89-AD3B9D3A50DC}.Release|x64.ActiveCfg = Release|Any CPU
21872189
{8A51A2A9-FBF4-40DC-AD89-AD3B9D3A50DC}.Release|x64.Build.0 = Release|Any CPU
2190+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2191+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Debug|Any CPU.Build.0 = Debug|Any CPU
2192+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Debug|x64.ActiveCfg = Debug|Any CPU
2193+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Debug|x64.Build.0 = Debug|Any CPU
2194+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Release|Any CPU.ActiveCfg = Release|Any CPU
2195+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Release|Any CPU.Build.0 = Release|Any CPU
2196+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Release|x64.ActiveCfg = Release|Any CPU
2197+
{F100414F-CD8D-49D4-BFE0-88D94E53E628}.Release|x64.Build.0 = Release|Any CPU
21882198
EndGlobalSection
21892199
GlobalSection(SolutionProperties) = preSolution
21902200
HideSolutionNode = FALSE
@@ -2493,6 +2503,7 @@ Global
24932503
{64B54122-44F1-4379-9422-953EF706A3A6} = {5944A182-13B8-4DA6-AEE2-0A01E64A9648}
24942504
{83310F46-E1C7-4438-B32A-9F6F7EA13FCF} = {64B54122-44F1-4379-9422-953EF706A3A6}
24952505
{8A51A2A9-FBF4-40DC-AD89-AD3B9D3A50DC} = {64B54122-44F1-4379-9422-953EF706A3A6}
2506+
{F100414F-CD8D-49D4-BFE0-88D94E53E628} = {41769FBF-91A8-48D1-B3BB-CAE4C814E7CD}
24962507
EndGlobalSection
24972508
GlobalSection(ExtensibilityGlobals) = postSolution
24982509
SolutionGuid = {40383055-CC50-4600-AD9A-53C14F620D03}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiResourceClaimEntityTypeConfiguration : IEntityTypeConfiguration<ApiResourceClaim>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiResourceClaim> builder)
9+
{
10+
builder.HasKey(x => x.Id);
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiResourceEntityTypeConfiguration : IEntityTypeConfiguration<ApiResource>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiResource> builder)
9+
{
10+
builder.Property(x => x.Name).HasMaxLength(200).IsRequired();
11+
builder.Property(x => x.DisplayName).HasMaxLength(200);
12+
builder.Property(x => x.Description).HasMaxLength(1000);
13+
builder.Property(x => x.AllowedAccessTokenSigningAlgorithms).HasMaxLength(100);
14+
builder.HasIndex(x => x.Name).IsUnique().HasFilter("NOT \"IsDeleted\"");
15+
builder.HasMany(x => x.Secrets).WithOne(x => x.ApiResource).HasForeignKey(x => x.ApiResourceId).OnDelete(DeleteBehavior.Cascade);
16+
builder.HasMany(x => x.ApiScopes).WithOne(x => x.ApiResource).HasForeignKey(x => x.ApiResourceId).IsRequired().OnDelete(DeleteBehavior.Cascade);
17+
builder.HasMany(x => x.UserClaims).WithOne(x => x.ApiResource).HasForeignKey(x => x.ApiResourceId).OnDelete(DeleteBehavior.Cascade);
18+
builder.HasMany(x => x.Properties).WithOne(x => x.ApiResource).HasForeignKey(x => x.ApiResourceId).OnDelete(DeleteBehavior.Cascade);
19+
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiResourcePropertyEntityTypeConfiguration : IEntityTypeConfiguration<ApiResourceProperty>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiResourceProperty> builder)
9+
{
10+
builder.Property(x => x.Key).HasMaxLength(250).IsRequired();
11+
builder.Property(x => x.Value).HasMaxLength(2000).IsRequired();
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiResourceScopeEntityTypeConfiguration : IEntityTypeConfiguration<ApiResourceScope>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiResourceScope> builder)
9+
{
10+
builder.HasKey(apiResourceScope => apiResourceScope.Id);
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiResourceSecretEntityTypeConfiguration : IEntityTypeConfiguration<ApiResourceSecret>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiResourceSecret> builder)
9+
{
10+
builder.Property(x => x.Description).HasMaxLength(1000);
11+
builder.Property(x => x.Value).HasMaxLength(4000).IsRequired();
12+
builder.Property(x => x.Type).HasMaxLength(250).IsRequired();
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiScopeClaimEntityTypeConfiguration : IEntityTypeConfiguration<ApiScopeClaim>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiScopeClaim> builder)
9+
{
10+
builder.HasKey(apiScopeClaim => apiScopeClaim.Id);
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiScopeEntityTypeConfiguration : IEntityTypeConfiguration<ApiScope>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiScope> builder)
9+
{
10+
builder.HasIndex(apiScope => apiScope.Name).IsUnique();
11+
12+
builder.Property(apiScope => apiScope.Name).HasMaxLength(200).IsRequired();
13+
builder.Property(apiScope => apiScope.DisplayName).HasMaxLength(200);
14+
builder.Property(apiScope => apiScope.Description).HasMaxLength(1000);
15+
16+
builder.HasMany(apiScope => apiScope.UserClaims).WithOne(apiScope => apiScope.ApiScope).HasForeignKey(apiScope => apiScope.ApiScopeId).IsRequired().OnDelete(DeleteBehavior.Cascade);
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ApiScopePropertyEntityTypeConfiguration : IEntityTypeConfiguration<ApiScopeProperty>
7+
{
8+
public void Configure(EntityTypeBuilder<ApiScopeProperty> builder)
9+
{
10+
builder.Property(x => x.Key).HasMaxLength(250).IsRequired();
11+
builder.Property(x => x.Value).HasMaxLength(2000).IsRequired();
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientClaimEntityTypeConfiguration : IEntityTypeConfiguration<ClientClaim>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientClaim> builder)
9+
{
10+
builder.Property(x => x.Type).HasMaxLength(250).IsRequired();
11+
builder.Property(x => x.Value).HasMaxLength(250).IsRequired();
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientCorsOriginEntityTypeConfiguration : IEntityTypeConfiguration<ClientCorsOrigin>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientCorsOrigin> builder)
9+
{
10+
builder.Property(x => x.Origin).HasMaxLength(150).IsRequired();
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientEntityTypeConfiguration : IEntityTypeConfiguration<Client>
7+
{
8+
public void Configure(EntityTypeBuilder<Client> builder)
9+
{
10+
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
11+
builder.Property(x => x.ProtocolType).HasMaxLength(200).IsRequired();
12+
builder.Property(x => x.ClientName).HasMaxLength(200);
13+
builder.Property(x => x.ClientUri).HasMaxLength(2000);
14+
builder.Property(x => x.LogoUri).HasMaxLength(2000);
15+
builder.Property(x => x.Description).HasMaxLength(1000);
16+
builder.Property(x => x.FrontChannelLogoutUri).HasMaxLength(2000);
17+
builder.Property(x => x.BackChannelLogoutUri).HasMaxLength(2000);
18+
builder.Property(x => x.ClientClaimsPrefix).HasMaxLength(200);
19+
builder.Property(x => x.PairWiseSubjectSalt).HasMaxLength(200);
20+
builder.Property(x => x.UserCodeType).HasMaxLength(100);
21+
builder.Property(x => x.AllowedIdentityTokenSigningAlgorithms).HasMaxLength(100);
22+
builder.HasIndex(x => x.ClientId);
23+
builder.HasIndex(x => x.ClientId).IsUnique().HasFilter("NOT \"IsDeleted\"");
24+
25+
builder.HasMany(x => x.AllowedGrantTypes).WithOne(x => x.Client);
26+
builder.HasMany(x => x.RedirectUris).WithOne(x => x.Client);
27+
builder.HasMany(x => x.PostLogoutRedirectUris).WithOne(x => x.Client);
28+
builder.HasMany(x => x.AllowedScopes).WithOne(x => x.Client);
29+
builder.HasMany(x => x.ClientSecrets).WithOne(x => x.Client);
30+
builder.HasMany(x => x.Claims).WithOne(x => x.Client);
31+
builder.HasMany(x => x.IdentityProviderRestrictions).WithOne(x => x.Client);
32+
builder.HasMany(x => x.AllowedCorsOrigins).WithOne(x => x.Client);
33+
builder.HasMany(x => x.Properties).WithOne(x => x.Client);
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientGrantTypeEntityTypeConfiguration : IEntityTypeConfiguration<ClientGrantType>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientGrantType> builder)
9+
{
10+
builder.Property(x => x.GrantType).HasMaxLength(250).IsRequired();
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientIdPRestrictionEntityTypeConfiguration : IEntityTypeConfiguration<ClientIdPRestriction>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientIdPRestriction> builder)
9+
{
10+
builder.Property(x => x.Provider).HasMaxLength(200).IsRequired();
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientPostLogoutRedirectUriEntityTypeConfiguration : IEntityTypeConfiguration<ClientPostLogoutRedirectUri>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientPostLogoutRedirectUri> builder)
9+
{
10+
builder.HasKey(x => x.Id);
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientPropertyEntityTypeConfiguration : IEntityTypeConfiguration<ClientProperty>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientProperty> builder)
9+
{
10+
builder.Property(x => x.Key).HasMaxLength(250).IsRequired();
11+
builder.Property(x => x.Value).HasMaxLength(2000).IsRequired();
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientRedirectUriEntityTypeConfiguration : IEntityTypeConfiguration<ClientRedirectUri>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientRedirectUri> builder)
9+
{
10+
builder.Property(x => x.RedirectUri).HasMaxLength(2000).IsRequired();
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientScopeEntityTypeConfiguration : IEntityTypeConfiguration<ClientScope>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientScope> builder)
9+
{
10+
builder.Property(x => x.Scope).HasMaxLength(200).IsRequired();
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class ClientSecretEntityTypeConfiguration : IEntityTypeConfiguration<ClientSecret>
7+
{
8+
public void Configure(EntityTypeBuilder<ClientSecret> builder)
9+
{
10+
builder.Property(x => x.Value).HasMaxLength(4000).IsRequired();
11+
builder.Property(x => x.Type).HasMaxLength(250).IsRequired();
12+
builder.Property(x => x.Description).HasMaxLength(2000);
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class DeviceFlowCodesEntityTypeConfiguration : IEntityTypeConfiguration<DeviceFlowCodes>
7+
{
8+
public void Configure(EntityTypeBuilder<DeviceFlowCodes> builder)
9+
{
10+
builder.Property(x => x.DeviceCode).HasMaxLength(200).IsRequired();
11+
builder.Property(x => x.UserCode).HasMaxLength(200).IsRequired();
12+
builder.Property(x => x.SubjectId).HasMaxLength(200);
13+
builder.Property(x => x.SessionId).HasMaxLength(100);
14+
builder.Property(x => x.ClientId).HasMaxLength(200).IsRequired();
15+
builder.Property(x => x.Description).HasMaxLength(200);
16+
builder.Property(x => x.CreationTime).IsRequired();
17+
builder.Property(x => x.Expiration).IsRequired();
18+
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
19+
// apparently anything over 4K converts to nvarchar(max) on SqlServer
20+
builder.Property(x => x.Data).HasMaxLength(50000).IsRequired();
21+
22+
builder.HasKey(x => new { x.UserCode });
23+
24+
builder.HasIndex(x => x.DeviceCode).IsUnique().HasFilter("NOT \"IsDeleted\"");
25+
builder.HasIndex(x => x.Expiration);
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class IdentityResourceClaimEntityTypeConfiguration : IEntityTypeConfiguration<IdentityResourceClaim>
7+
{
8+
public void Configure(EntityTypeBuilder<IdentityResourceClaim> builder)
9+
{
10+
builder.HasKey(identityResourceClaim => identityResourceClaim.Id);
11+
}
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class IdentityResourceEntityTypeConfiguration : IEntityTypeConfiguration<IdentityResource>
7+
{
8+
public void Configure(EntityTypeBuilder<IdentityResource> builder)
9+
{
10+
builder.Property(x => x.Name).HasMaxLength(200).IsRequired();
11+
builder.Property(x => x.DisplayName).HasMaxLength(200);
12+
builder.Property(x => x.Description).HasMaxLength(1000);
13+
builder.HasIndex(x => x.Name).IsUnique().HasFilter("NOT \"IsDeleted\"");
14+
15+
builder.HasMany(x => x.UserClaims).WithOne(x => x.IdentityResource).HasForeignKey(x => x.IdentityResourceId).IsRequired().OnDelete(DeleteBehavior.Cascade);
16+
builder.HasMany(x => x.Properties).WithOne(x => x.IdentityResource).HasForeignKey(x => x.IdentityResourceId).IsRequired().OnDelete(DeleteBehavior.Cascade);
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) MASA Stack All rights reserved.
2+
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.
3+
4+
namespace Masa.Contrib.Authentication.OpenIdConnect.EFCore.PostgreSql.EntityConfigurations;
5+
6+
public class IdentityResourcePropertyEntityTypeConfiguration : IEntityTypeConfiguration<IdentityResourceProperty>
7+
{
8+
public void Configure(EntityTypeBuilder<IdentityResourceProperty> builder)
9+
{
10+
builder.Property(x => x.Key).HasMaxLength(250).IsRequired();
11+
builder.Property(x => x.Value).HasMaxLength(2000).IsRequired();
12+
}
13+
}

0 commit comments

Comments
 (0)