【发布时间】:2018-03-29 02:33:12
【问题描述】:
我在本地安装了 openIdm ForgeRock,我正在尝试通过 API Explorer 等查看如何使用端点和可用的端点。
从正在运行 ForgeRock 的 localhost:8080 我可以运行/尝试请求。它工作正常,我看到Status 200 的响应及其详细信息。
当我在 Postman 上尝试相同的请求 URL 时,我得到:
{
"code": 401,
"reason": "Unauthorized",
"message": "Access Denied"
}
在某种程度上这对我来说是有意义的,因为在这种情况下我没有直接通过 localhost:8080 上的 ForgeRock 服务器登录。那么我该如何解决这个问题才能在 Postman 上运行我的测试。
我在 Postman 上的 Request 中尝试了参数 username=xxx 和 password=xxx,但它一直抛出同样的错误。
我也在 Postman 上尝试了它作为 CURL 请求,确切地说是 ForgeRock 是如何使用它的,但它似乎有授权问题。
curl -X GET --header 'Accept: application/json' --header 'X-Requested-With: Swagger-UI' 'http://localhost:8080/openidm/managed/user?_queryId=query-all'
有什么想法吗?
【问题讨论】: