为什么每次通话都往返于自省点?

时间:2019-04-11 01:45:25

标签: c# reactjs asp.net-core identityserver4

对于每个受保护的API调用,我看到的是对身份服务器自省端点的调用。我可以阻止这种情况发生吗?

我们有一个使用隐式流程的React应用程序。当应用程序收到访问令牌时,它将用于使用访问令牌对另一个Web API进行调用。我们注意到,每次调用都会调用自省端点。

我认为JWT令牌不需要在每次调用时针对发行者进行验证。

我有以下应用设置:

services.AddAuthentication("Bearer")
                .AddIdentityServerAuthentication(options =>
                {
                    options.Authority = identityServiceUri;
                    options.ApiName = "SMAppServices";
                    options.RequireHttpsMetadata = false;
                });

1 个答案:

答案 0 :(得分:0)

您可能已将访问令牌类型设置为引用类型。您可以在IdentityServer的客户端配置中进行检查。客户端类中有一个名为AccessTokenType的属性。

相关问题