我正试图从驻留在另一台服务器上的应用程序通过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中的配置,有人可以告诉我吗?
答案 0 :(得分:0)
通常对于此错误消息我检查两件事 1.客户端密码对客户端ID 2.客户端是否配置了授权代码流。