【问题标题】:How to properly construct a OAuth2 GET request using typescript/angular?如何使用 typescript/angular 正确构建 OAuth2 GET 请求?
【发布时间】:2021-10-26 23:14:24
【问题描述】:

我有以下 GET 端点:

<a href="https://developer.api.autodesk.com/authentication/v1/authorize?response_type=code&client_id=obQDn8P0GanGFQha4ngKKVWcxwyvFAGE&redirect_uri=http%3A%2F%2Fsampleapp.com%2Foauth%2Fcallback%3Ffoo%3Dbar&scope=data:read">Click here to grant access to your data!</a>

href 包含以下内容:

https://developer.api.autodesk.com/authentication/v1/authorize 这是端点 URI

response_type=code

client_id=obQDn8P0GanGFQha4ngKKVWcxwyvFAGE 客户 ID。

redirect_uri=http%3A%2F%2Fsampleapp.com%2Foauth%2Fcallback%3Ffoo%3Dbar 这是 URL 编码的回调 URL

是否可以使用上述构造一个post请求并订阅返回值?

任何线索或参考将不胜感激

【问题讨论】:

    标签: javascript angular typescript autodesk-forge


    【解决方案1】:

    我不建议离协议实现本身那么近,但要寻找一个可以帮助你的库。试试angular-auth-oidc-client,这应该会让你走上正轨。

    【讨论】:

      猜你喜欢
      • 2019-03-12
      • 1970-01-01
      • 2013-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-23
      • 1970-01-01
      相关资源
      最近更新 更多