|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Volo.Abp.EntityFrameworkCore;
|
|
|
|
|
using Volo.Abp.EntityFrameworkCore.Modeling;
|
|
|
|
|
using Volo.Abp.IdentityServer.ApiResources;
|
|
|
|
|
using Volo.Abp.IdentityServer.Clients;
|
|
|
|
@ -71,7 +72,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
|
|
|
|
|
|
|
|
|
|
redirectUri.HasKey(x => new { x.ClientId, x.RedirectUri });
|
|
|
|
|
|
|
|
|
|
redirectUri.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLength).IsRequired();
|
|
|
|
|
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
|
|
|
|
|
{
|
|
|
|
|
redirectUri.Property(x => x.RedirectUri).HasMaxLength(300).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
redirectUri.Property(x => x.RedirectUri).HasMaxLength(ClientRedirectUriConsts.RedirectUriMaxLength).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
builder.Entity<ClientPostLogoutRedirectUri>(postLogoutRedirectUri =>
|
|
|
|
@ -80,7 +88,14 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
|
|
|
|
|
|
|
|
|
|
postLogoutRedirectUri.HasKey(x => new { x.ClientId, x.PostLogoutRedirectUri });
|
|
|
|
|
|
|
|
|
|
postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLength).IsRequired();
|
|
|
|
|
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
|
|
|
|
|
{
|
|
|
|
|
postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(300).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
postLogoutRedirectUri.Property(x => x.PostLogoutRedirectUri).HasMaxLength(ClientPostLogoutRedirectUriConsts.PostLogoutRedirectUriMaxLength).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
builder.Entity<ClientScope>(scope =>
|
|
|
|
@ -99,7 +114,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
|
|
|
|
|
secret.HasKey(x => new { x.ClientId, x.Type, x.Value });
|
|
|
|
|
|
|
|
|
|
secret.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired();
|
|
|
|
|
secret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
|
|
|
|
|
|
|
|
|
|
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
|
|
|
|
|
{
|
|
|
|
|
secret.Property(x => x.Value).HasMaxLength(300).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
secret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
secret.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -214,7 +238,16 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
|
|
|
|
|
apiSecret.HasKey(x => new { x.ApiResourceId, x.Type, x.Value });
|
|
|
|
|
|
|
|
|
|
apiSecret.Property(x => x.Type).HasMaxLength(SecretConsts.TypeMaxLength).IsRequired();
|
|
|
|
|
apiSecret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
|
|
|
|
|
|
|
|
|
|
if (options.DatabaseProvider == EfCoreDatabaseProvider.MySql)
|
|
|
|
|
{
|
|
|
|
|
apiSecret.Property(x => x.Value).HasMaxLength(300).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
apiSecret.Property(x => x.Value).HasMaxLength(SecretConsts.ValueMaxLength).IsRequired();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apiSecret.Property(x => x.Description).HasMaxLength(SecretConsts.DescriptionMaxLength);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|