【发布时间】:2017-10-30 15:16:22
【问题描述】:
我正在尝试通过驻留在另一台服务器上的应用程序的 Post Call 从 Identity Server 3 获取令牌。
我将以下值发布到https://mydomainhost.net/connect/token:
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query(array(
'client_id' => 'myclientid',
'client_secret' => 'myclientsecret',
'redirect_uri' => 'http://myotherdomain.com/test.php',
'grant_type' => 'authorization_code'
)));
但是正在返回以下错误:
string(31) "{"error":"unauthorized_client"}"
我已将“client_id”值更改为肯定未配置的用户名并获得以下信息:
string(26) "{"error":"invalid_client"}"
我只使用不存在的用户名进行测试,看看我是否得到不同的结果。
有人可以告诉我这是来自调用 Identity Server 的应用程序的错误,还是来自 Identity Server 中的配置?
【问题讨论】:
-
您可以粘贴您的客户端配置吗?
-
我正在尝试连接到第 3 方 - 无法从他们那里获取客户端配置。
-
我同意 Boopathy 的回答 - 您可以在客户端配置中仔细检查 clientid 和 clientsecret。
标签: identityserver3 identityserver4 identityserver2