Asp.net core 当AuthenticationSchemes设置为others时,是否必须执行默认身份验证方案?

Asp.net core 当AuthenticationSchemes设置为others时,是否必须执行默认身份验证方案?,asp.net-core,authentication,Asp.net Core,Authentication,我们有两个名为“custom1”和“custom2”的认证窗口。代码是: var authBuilder = services.AddAuthentication("custom1"); authBuilder.AddJwtBearer("custom1", options => { options.EventsType = typeof(Custom1AuthJwtBearerEvents); }); authBuilder.AddJwtB

我们有两个名为“custom1”和“custom2”的认证窗口。代码是:

var authBuilder = services.AddAuthentication("custom1");
authBuilder.AddJwtBearer("custom1", options =>
{
    options.EventsType = typeof(Custom1AuthJwtBearerEvents);
});
authBuilder.AddJwtBearer("custom2", );
控制器代码为:

[Authorize(AuthenticationSchemes = "custom2")]
上述身份验证方案将运行到Custom1AuthJWTBeareEvents,身份验证结果失败。但结果并不影响custom2的身份验证结果

有一个相关的解决方案:

但令人困惑的是,即使将身份验证方案设置为其他方案,默认方案仍会执行,这是预期的流程吗?

在不修改用法的情况下,是否有任何解决方案可用于aovid执行默认方案?