【问题标题】:Sign Identity Server 4 tokens using HS256使用 HS256 签署 Identity Server 4 令牌
【发布时间】:2019-03-28 15:37:52
【问题描述】:

我有一个现有的 api,它生成和使用带有如下标头的 jwt

{
  "typ": "JWT",
  "alg": "HS256"
}

api使用JWT承载认证

app.UseJwtBearerAuthentication(new JwtBearerAuthenticationOptions
{
    AuthenticationMode = AuthenticationMode.Active,
    AllowedAudiences = new[] { "Any" },
    IssuerSecurityTokenProviders = new IIssuerSecurityTokenProvider[]
    {
        new SymmetricKeyIssuerSecurityTokenProvider(issuer, secret)
    }
});

我现在想将身份服务器用于我想与之集成的客户端。 如何让身份服务器以现有 api 期望的方式对令牌进行签名 (HS256)。

【问题讨论】:

    标签: identityserver4


    【解决方案1】:

    IdentityServer 不支持对称密钥。

    【讨论】:

      猜你喜欢
      • 2017-06-29
      • 2020-08-05
      • 2021-03-01
      • 1970-01-01
      • 2018-06-01
      • 2018-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多