douan4106 2014-10-03 12:23
浏览 31

oauth2-server-laravel的问题

I'm new to OAuth. I'm trying to implement https://github.com/lucadegasperi/oauth2-server-laravel#password-flow

I've already inserted id and secret into oauth_clients table. Also I have inserted username and password into users table. (via Phpmyadmin)

After I try to do the request:

POST http://localhost:8000/oauth/access_token?
grant_type=password&
client_id=weredfsdfsrq341&
client_secret=dfwefsdf&
username=test@test.com&
password=123456

But response is:

{
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."
}

My route is

Route::post('oauth/access_token', function()
{
    return AuthorizationServer::performAccessTokenFlow();
});

What am I doing wrong?

  • 写回答

3条回答 默认 最新

  • douyi1963 2014-10-20 18:46
    关注

    Please make sure the content type is set to "x-www-form-urlencoded" when you make that POST.

    评论

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统