【问题标题】:How does owin/WIF verify adfs jwt token?owin/WIF 如何验证 adfs jwt 令牌?
【发布时间】:2017-08-25 05:40:48
【问题描述】:

我有一个使用 OWIN 中间件的 api。 我的 adfs 使用 RSASHA256 算法生成 jwt 令牌。

api 知道受众 uri、联合元数据和 adfs 令牌生成 URI。

我知道它使用 公共证书 来验证安全令牌。但是它是如何获得公共证书的呢? 它是否使用联合元数据?我尝试 jwt.io 通过使用 federation metadata 中的一些 x509 证书来验证 jwt 令牌,但它不起作用。

它是否与后台的 adfs 令牌生成 URI 对话以获取 证书

请问有人能解释一下吗?

【问题讨论】:

    标签: c# owin jwt katana adfs3.0


    【解决方案1】:

    我相信当您在 OWIN 配置中设置如下元数据时,它将使用元数据中指定的证书公钥执行签名验证。

    public void Configuration(IAppBuilder app)
    {
      WsFederationAuthenticationOptions options = new WsFederationAuthenticationOptions {
        MetadataAddress = "your ADFS metadata URL",
        // Further config
      };
    app.UseWsFederationAuthentication(options);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-11-25
      • 1970-01-01
      • 2016-01-19
      • 2017-01-12
      • 1970-01-01
      • 2016-08-06
      • 2018-10-16
      相关资源
      最近更新 更多