Guest User

Untitled

a guest
Sep 21st, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. $username = Input::json('username');
  2. $password = Input::json('password');
  3.  
  4. $page = Input::get('page');
  5.  
  6. $client = Client::find(2);
  7.  
  8. $http = new GuzzleHttpClient();
  9.  
  10. try {
  11. $response = $http->post(url('oauth/token'), [ # <-- see the problem?
  12. 'form_params' => [
  13. 'grant_type' => 'password',
  14. 'client_id' => '2',
  15. 'client_secret' => $client->secret,
  16. 'username' => $username,
  17. 'password' => $password,
  18. 'scope' => '',
  19. ],
  20. ]);
  21.  
  22. #...
Add Comment
Please, Sign In to add comment