postman - 使用 Postman 测试 OAuth 身份验证代码流
问题描述
我正在尝试使用 Postman 来测试身份验证代码流 - 但它似乎无法正常工作。我不确定这是 IS4 还是 Postman 问题。
我使用此处的文档创建了一个新实例:
http://docs.identityserver.io/en/latest/quickstarts/0_overview.html
创建了一个新客户端:
new Client
{
ClientId = "code",
RedirectUris =
{
"https://www.getpostman.com/oauth2/callback"
},
AllowedGrantTypes = GrantTypes.CodeAndClientCredentials,
ClientSecrets =
{
new Secret("apisecret".Sha256())
},
AllowedScopes =
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
"api1"
},
AllowOfflineAccess = true
}
然后使用 Postman 尝试获取 id 令牌。
然后我使用 bob/bob 或 alice/alice 登录,当我单击登录按钮时,它只是重定向回登录屏幕。
我期待访问令牌被检索。
在使用 SPA 客户端对演示实例( https://demo.identityserver.io/ )进行测试时,我也遇到了同样的问题。
如果我使用 SoapUi 它可以工作。
解决方案
推荐阅读
- c# - 无法使用 Fare 从复杂的正则表达式生成字符串
- node.js - 如何手动实现背压
- r - R 中的 Kruskal-wallis 测试给出错误:model.frame.default 中的错误:可变长度不同
- java - E/REALM_JNI: jni: ThrowingException 5, mmap() failed: Out of memory size: 369098752
- php - 图片上传失败(图片转换 Laravel)
- excel - 在特定 Windows 显示比例下调整大小时,InkPicture 呈现不正确
- c# - 使用 Moq 和接口进行单元测试
- php - 是否可以在 og 标签中为网站的不同页面添加自定义预览图像?
- java - 在 PlantUML 中呈现非 ASCII 字符所需的配置
- vba - 字代码 4605 中的错误 VBA“无法使用 SetWidth,因为对象引用了表格行的末尾。”