【发布时间】:2014-01-18 01:36:13
【问题描述】:
我正在尝试将 OAuth2 grant_type=password 用于令牌请求,如 here 所述,使用 WSO2 API 管理器。使用以下 curl 命令。
curl -k -d "grant_type=password&username=<uname>&password=<pwd>&scope=PRODUCTION" http://localhost:8280/token
这个请求的响应是:
{"error":"invalid_request","error_description":"Missing parameters: client_id"}
接下来,我提供了我的消费者密钥,curl 请求变成了以下内容:
curl -k -d "grant_type=password&username=<uname>&password=<pwd>&scope=PRODUCTION&client_id=<myconsumerkey>" http://localhost:8280/token
然而,反应令人费解:
{"error":"unsupported_client_authentication_method","error_description":"Unsupported Client Authentication Method!"}
那么,我的问题是 API Man 不支持这个 grant_type 吗?或者,我在这里做错了什么?我应该查看此授权类型的身份服务器吗?
干杯
【问题讨论】: