【发布时间】:2018-05-25 08:43:25
【问题描述】:
我是 OAuth 新手。我正在尝试实现https://github.com/lucadegasperi/oauth2-server-laravel#password-flow
我已经将id 和secret 插入到oauth_clients 表中。我还把用户名和密码插入到users 表中。 (通过 Phpmyadmin)
在我尝试执行请求后:
POST http://localhost:8000/oauth/access_token?
grant_type=password&
client_id=weredfsdfsrq341&
client_secret=dfwefsdf&
username=test@test.com&
password=123456
但反应是:
{
error: "invalid_request"
error_description: "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "client_id" parameter."
}
我的路线是
Route::post('oauth/access_token', function()
{
return AuthorizationServer::performAccessTokenFlow();
});
我做错了什么?
【问题讨论】:
-
同样的问题,你有解决办法吗?我正在将 v1 升级到 v3
-
遇到同样的问题:“请求缺少必需的参数,包含无效的参数值,包含不止一次的参数,或者格式错误。请检查“grant_type”参数。”尝试更改为 x-www,结果相同