【问题标题】:How to override services coupling caused by IdentityServer3.accesstokenvalidation如何覆盖由 IdentityServer3.accesstokenvalidation 引起的服务耦合
【发布时间】:2018-05-17 18:32:32
【问题描述】:

我有一个身份服务器4,它验证随 API 接收的请求一起发送的令牌。

为此,我使用了 identityserver3.accesstokenvalidation。

在启动中:

 JwtSecurityTokenHandler.InboundClaimTypeMap = new Dictionary<string, string>();
 app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
    {
       Authority = Configurations.AuthorizationAuthority,
    });

现在我可能会遇到运行 identityserver4 的服务器很快(多秒)不可用的情况。

如果发生这种情况,包含我的 API 的服务将无法运行:

无法建立连接,因为目标机器主动 拒绝了

即使 IdentityServer 服务器未运行,我也希望我的 API 服务启动,是否有某种配置 Identityserver3.accesstokenvalidation 提供来解决此问题?

【问题讨论】:

    标签: microservices access-token identityserver3 identityserver4


    【解决方案1】:

    DelayLoadMetadata 设置为true

    【讨论】:

    猜你喜欢
    • 2017-05-16
    • 1970-01-01
    • 1970-01-01
    • 2018-11-19
    • 1970-01-01
    • 2017-10-06
    • 2021-07-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多