【问题标题】:IdentityServer4 usage of IdentityServerTools to create a token from within identity serverIdentityServer4 使用 IdentityServerTools 从身份服务器中创建令牌
【发布时间】:2019-04-26 06:25:35
【问题描述】:

我正在使用 IdentityServer4 并且有一个场景,我需要在密码重置过程中发起对安全 API 的调用。 IdentityServer4 确实提供了IdentityServerTools 用于从扩展点调用安全资源,但是目前没有缩进用法的文档或示例。

如何使用IdentityServerTools 中提供的方法创建必要的令牌?

【问题讨论】:

    标签: identityserver4 asp.net-core-webapi api-authorization


    【解决方案1】:

    IdentityServerTools 可从 DI 获得。只需将其注入您的类并调用该方法来创建客户端令牌。

    https://docs.identityserver.io/en/latest/topics/tools.html

    【讨论】:

    • 我不赞成你的回答。没有关于如何使用这个类的文档。并且 OP 专门询问“如何使用 IdentityServerTools 中提供的方法创建必要的令牌?”请提供一个示例。
    • 非常感谢您为我们创建了该文档。现在更清楚了。我现在无法投票。我请您编辑您的答案并包含链接,以便我投票。 (所以在以某种方式编辑之前不允许我这样做)
    • 有关如何使用 IdentityServerTools 类的更多信息,请参阅此博客。 strathweb.com/2017/10/…
    猜你喜欢
    • 2018-10-05
    • 2022-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-19
    • 2017-04-07
    相关资源
    最近更新 更多