【问题标题】:how to get access token via identityserver4 via method (not api)?如何通过方法(不是api)通过identityserver4获取访问令牌?
【发布时间】:2019-04-19 06:39:56
【问题描述】:

您可以通过请求令牌来获取令牌(如下例所示)。

但是如何从 identityserver 类中获取(客户端凭据)访问令牌(无需通过 http POST Web 服务 api 请求)?是否有用于获取访问令牌的 identityserver4 方法?


http://docs.identityserver.io/en/release/endpoints/token.html

POST /connect/token

client_id=client1&
client_secret=secret&
grant_type=authorization_code&
code=hdh922&
redirect_uri=https://myapp.com/callback

【问题讨论】:

    标签: c# asp.net oauth access-token identityserver4


    【解决方案1】:

    是的,您可以使用 IdentityServerTools 类中的 IssueJwtAsyncIssueClientJwtAsync 方法来做到这一点。

    根据documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-27
      • 2021-10-04
      • 1970-01-01
      • 2018-06-13
      • 2012-06-19
      • 1970-01-01
      • 1970-01-01
      • 2016-11-30
      相关资源
      最近更新 更多