我在本地正在测试authing的oauth 2.0的password 模式,根据开发文档里不同的几个url都进行尝试了,一直会返回同样的错误,错误如下:
{
“error”: “invalid_client”,
“error_description”: “Invalid client: cannot retrieve client credentials”
}
request如下:
curl --request POST \
–url https://{domain}/oauth/token \
–header ‘Content-Type: application/x-www-form-urlencoded’ \
–data-urlencode ‘grant_type=password’ \
–data-urlencode ‘app_id={app_id}’ \
–data-urlencode ‘app_secret={app_secret}’ \
–data-urlencode ‘scope=user’ \
--data-urlencode 'username={test_user}' \
–data-urlencode ‘password={test_user_password}’