Identityserver4 无法验证IdentityServer 3颁发的令牌

Identityserver4 无法验证IdentityServer 3颁发的令牌,identityserver4,identityserver3,Identityserver4,Identityserver3,我们已将Identityserver3升级为Identityserver4,并在API端点中使用Identityserver3.AccessTokenValidation来验证jwt令牌 升级后,我们无法验证IdentityServer3颁发的令牌 通过使用选项LegacyAudienceValidation=true,我们可以使用IdentityServer4.AccessTokenValidation;支持来自Identityserver3和Identityserver4的令牌 Identi

我们已将Identityserver3升级为Identityserver4,并在API端点中使用Identityserver3.AccessTokenValidation来验证jwt令牌

升级后,我们无法验证IdentityServer3颁发的令牌

通过使用选项LegacyAudienceValidation=true,我们可以使用IdentityServer4.AccessTokenValidation;支持来自Identityserver3和Identityserver4的令牌

IdentityServer4.AccessTokenValidation基于我们不使用的.NET核心。这不是将所有API端点升级到.NET Core的选项,我们需要能够支持IdentityServer 3发行的令牌


我们如何使现有的API端点支持identityserver3和identityserver4发行的令牌。我们的大多数API端点都基于Microsoft OWIN和.NET Framework 4.5.1

等等,这里有点不清楚。您的服务器是什么版本-3或4?我们目前使用Identityserver4,但以前使用Identityserver3。这就是我们需要同时支持identity server 3和identity server 4颁发的令牌的原因。为什么需要继续支持identity server 3令牌?它们将在5分钟内失效?我们发布的访问令牌的生存期为180天,因此迫使我们继续支持它们,否则所有用户都需要重新登录。如果您的访问令牌的有效期为180天,则您的问题非常严重。根据规范和专家意见,访问令牌应尽可能短。这有它的解释——一旦发布,它就不能失效,180天是一个非常长的时间,可以指望。