Asp.net identity 更改IdentityServerAuthenticationOptions上的ApiName后,客户端仍与Identity Server 4一起工作

Asp.net identity 更改IdentityServerAuthenticationOptions上的ApiName后,客户端仍与Identity Server 4一起工作,asp.net-identity,.net-core,identityserver4,Asp.net Identity,.net Core,Identityserver4,我是Identity Server 4的新用户,现在正在关注官方消息 医生建议玩一些选项,这样你就可以了解这一切是如何运作的。但在我尝试了最后一个“进一步实验”点后,我遇到了麻烦 当我更改API Startup.cs文件上的ApiName时,如下所示: app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions { Authority = "http://localhost:5000",

我是Identity Server 4的新用户,现在正在关注官方消息

医生建议玩一些选项,这样你就可以了解这一切是如何运作的。但在我尝试了最后一个“进一步实验”点后,我遇到了麻烦

当我更改API Startup.cs文件上的ApiName时,如下所示:

app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
{
    Authority = "http://localhost:5000",
    RequireHttpsMetadata = false,

    ApiName = "api2" //<-- this was api1
});
app.UseIdentityServerAuthentication(新的IdentityServerAuthenticationOptions
{
权威=”http://localhost:5000",
RequireHttpsMetadata=false,

ApiName=“api2”/对此我也不确定,但我认为ApiName不是范围。如果您添加

AllowedScopes={“api2”}到选项,那么结果将是“禁止”


Ty作为回复,现在它就像一个符咒!我想知道ApiName属性的含义是什么…这是一个bug。看看这个