owin - 如何使用 owin 交易访问令牌的代码
问题描述
我正在使用 Identity Server 4 V3 和带有 Owin 客户端的 .Net Framework V4.6。我正在尝试实现authroization_code
流程,但无法弄清楚如何将 Identity Server 提供的代码换成访问和 id 令牌。如何在以下事件处理程序中执行此操作:
AuthorizationCodeReceived = async context =>
{
var code = context.Code;
//Now what?
return;
}
解决方案
POST /connect/token
client_id=client1&
client_secret=secret&
grant_type=authorization_code&
code=hdh922&
redirect_uri=https://myapp.com/callback
推荐阅读
- algorithm - N叉树中BFS的复杂度
- cuda - “'long double' 在设备代码中被视为 'double'”的 NVCC 警告标记是什么?
- typescript - 你能得到一个基类型的所有子类型的联合吗?
- c# - XUnit Mock 没有像我期望的那样抛出异常
- reactjs - 使用 React 时 Vs 代码在 UI 中显示红色和黄色
- pentaho - 有没有一种方法可以通过脚本将 PDI 作业和转换从版本 6 升级到 9
- postgresql - Windows 的实际 PostgreSQL 下载 URL 是什么?
- angular - 离子存储不能与多个服务一起使用
- reactjs - 在渲染期间而不是在 useEffect 中更改 ref 的值是否安全?
- python - 对数据框中的列求和,其中列名类似于字符串,并输出到新列