Browse Source

IdentityServer minor revison notes.

Resolve #195
pull/1873/head
maliming 7 years ago
parent
commit
07ad1558fe
  1. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs
  2. 8
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs
  3. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs
  4. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientIdPRestrictionConsts.cs
  5. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUriConsts.cs
  6. 4
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientPropertyConsts.cs
  7. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientRedirectUriConsts.cs
  8. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientScopeConsts.cs
  9. 4
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs
  10. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs
  11. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/UserClaimConsts.cs
  12. 3
      modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs

@ -2,8 +2,8 @@
{
public class ApiScopeConsts
{
public const int NameMaxLength = 196;
public const int DisplayNameMaxLength = 128;
public const int DescriptionMaxLength = 256;
public const int NameMaxLength = 200;
public const int DisplayNameMaxLength = 200;
public const int DescriptionMaxLength = 1000;
}
}

8
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs

@ -8,15 +8,15 @@
public const int ClientNameMaxLength = 200;
public const int ClientUriMaxLength = 300;
public const int ClientUriMaxLength = 2000;
public const int LogoUriMaxLength = 300;
public const int LogoUriMaxLength = 2000;
public const int DescriptionMaxLength = 1000;
public const int FrontChannelLogoutUriMaxLength = 300;
public const int FrontChannelLogoutUriMaxLength = 2000;
public const int BackChannelLogoutUriMaxLength = 300;
public const int BackChannelLogoutUriMaxLength = 2000;
public const int ClientClaimsPrefixMaxLength = 200;

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs

@ -2,6 +2,6 @@
{
public class ClientGrantTypeConsts
{
public const int GrantTypeMaxLength = 196;
public const int GrantTypeMaxLength = 250;
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientIdPRestrictionConsts.cs

@ -2,6 +2,6 @@
{
public class ClientIdPRestrictionConsts
{
public const int ProviderMaxLength = 64;
public const int ProviderMaxLength = 200;
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientPostLogoutRedirectUriConsts.cs

@ -2,6 +2,6 @@
{
public class ClientPostLogoutRedirectUriConsts
{
public const int PostLogoutRedirectUriMaxLength = 200;
public const int PostLogoutRedirectUriMaxLength = 2000;
}
}

4
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientPropertyConsts.cs

@ -2,7 +2,7 @@
{
public class ClientPropertyConsts
{
public const int KeyMaxLength = 64;
public const int ValueMaxLength = 128;
public const int KeyMaxLength = 250;
public const int ValueMaxLength = 2000;
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientRedirectUriConsts.cs

@ -2,6 +2,6 @@
{
public class ClientRedirectUriConsts
{
public const int RedirectUriMaxLength = 200;
public const int RedirectUriMaxLength = 2000;
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientScopeConsts.cs

@ -2,6 +2,6 @@
{
public class ClientScopeConsts
{
public const int ScopeMaxLength = 196;
public const int ScopeMaxLength = 200;
}
}

4
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs

@ -6,5 +6,9 @@
public const int TypeMaxLength = 50;
public const int SubjectIdMaxLength = 200;
public const int ClientIdMaxLength = 200;
// 50000 chosen to be explicit to allow enough size to avoid truncation, yet stay beneath the MySql row size limit of ~65K
// apparently anything over 4K converts to nvarchar(max) on SqlServer
public const int DataMaxLength = 5000;
}
}

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs

@ -2,8 +2,8 @@
{
public class SecretConsts
{
public const int TypeMaxLength = 32;
public const int ValueMaxLength = 196;
public const int DescriptionMaxLength = 256;
public const int TypeMaxLength = 250;
public const int ValueMaxLength = 4000;
public const int DescriptionMaxLength = 2000;
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/UserClaimConsts.cs

@ -2,6 +2,6 @@
{
public class UserClaimConsts
{
public const int TypeMaxLength = 196;
public const int TypeMaxLength = 200;
}
}

3
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/EntityFrameworkCore/IdentityServerDbContextModelCreatingExtensions.cs

@ -151,11 +151,12 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore
grant.Property(x => x.SubjectId).HasMaxLength(PersistedGrantConsts.SubjectIdMaxLength);
grant.Property(x => x.ClientId).HasMaxLength(PersistedGrantConsts.ClientIdMaxLength).IsRequired();
grant.Property(x => x.CreationTime).IsRequired();
grant.Property(x => x.Data).IsRequired();
grant.Property(x => x.Data).HasMaxLength(PersistedGrantConsts.DataMaxLength).IsRequired();
grant.HasKey(x => x.Key); //TODO: What about Id!!!
grant.HasIndex(x => new { x.SubjectId, x.ClientId, x.Type });
grant.HasIndex(x => x.Expiration);
});
builder.Entity<IdentityResource>(identityResource =>

Loading…
Cancel
Save