其他分享
首页 > 其他分享> > ABP框架使用(版本3.3.1) - IdentityServer

ABP框架使用(版本3.3.1) - IdentityServer

作者:互联网

1.IdentityServerClientScopes 分配的Scope太多,会报错
“Scope parameter exceeds max allowed length”

在Domain.Shared层改MyAppModuleExtensionConfigurator可以改abp identityserver定义的const值

private static void ConfigureExistingProperties()
{
  ClientScopeConsts.ScopeMaxLength = 1000;
} 

这表里面字段长度,而Scope parameter validation是identityserver4的包里做的,这样改并没有效果

应该在Host层改变IdentityServerOptions , PreConfigureServices 和 PostConfigureServices 都可以

        public override void PreConfigureServices(ServiceConfigurationContext context)
        {
            PreConfigure<IdentityServerOptions>(options =>
            {
                options.InputLengthRestrictions.Scope = 2000;
            });

            PreConfigure<IdentityBuilder>(identityBuilder =>
            {
                identityBuilder.AddSignInManager<CustomSignInManager>();
            });
        }

  

标签:PreConfigure,void,PreConfigureServices,ABP,3.3,Scope,IdentityServer,parameter,op
来源: https://www.cnblogs.com/sui84/p/14123634.html