OAuth2 服务器:无效或缺少 grant_type 参数
OAuth2 server: invalid or missing grant_type parameter
我在局域网中启动了一个基于 NodeJS 的 OAuth2 服务器(使用 oauth2-server
模块)。我想使用 Postman REST Client 对其进行测试,但收到此错误响应:
{
"code": 400,
"error": "invalid_request",
"error_description": "Invalid or missing grant_type parameter"
}
这是我的请求配置:
我尝试通过 URL 发送参数,但收到错误消息:Method must be POST with application/x-www-form-urlencoded encoding
.
谢谢。
使用邮递员将值作为查询参数发送,但 'oauth2-server' 使用 'req.body' 检查值作为正文参数。因此请尝试将值作为正文参数发送或更改 req.body 到 req.query 里面 node_modules/oauth2-server/lib/grant.js
我在局域网中启动了一个基于 NodeJS 的 OAuth2 服务器(使用 oauth2-server
模块)。我想使用 Postman REST Client 对其进行测试,但收到此错误响应:
{
"code": 400,
"error": "invalid_request",
"error_description": "Invalid or missing grant_type parameter"
}
这是我的请求配置:
我尝试通过 URL 发送参数,但收到错误消息:Method must be POST with application/x-www-form-urlencoded encoding
.
谢谢。
使用邮递员将值作为查询参数发送,但 'oauth2-server' 使用 'req.body' 检查值作为正文参数。因此请尝试将值作为正文参数发送或更改 req.body 到 req.query 里面 node_modules/oauth2-server/lib/grant.js